aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/thumbnail.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-01 16:54:24 +0200
committerChocobozzz <me@florianbigard.com>2019-08-01 16:54:24 +0200
commit65af03a241aa83ab7ba71278b6c99acd26428b8a (patch)
tree0cc04c31cdf631d11a915ae40389e8fa141f136b /server/models/video/thumbnail.ts
parenta21e25ff641854c8b01664cb18655aa420620af6 (diff)
downloadPeerTube-65af03a241aa83ab7ba71278b6c99acd26428b8a.tar.gz
PeerTube-65af03a241aa83ab7ba71278b6c99acd26428b8a.tar.zst
PeerTube-65af03a241aa83ab7ba71278b6c99acd26428b8a.zip
Automatically update playlist thumbnails
Diffstat (limited to 'server/models/video/thumbnail.ts')
-rw-r--r--server/models/video/thumbnail.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts
index 8faf0adba..b767a6874 100644
--- a/server/models/video/thumbnail.ts
+++ b/server/models/video/thumbnail.ts
@@ -44,6 +44,10 @@ export class ThumbnailModel extends Model<ThumbnailModel> {
44 @Column 44 @Column
45 fileUrl: string 45 fileUrl: string
46 46
47 @AllowNull(true)
48 @Column
49 automaticallyGenerated: boolean
50
47 @ForeignKey(() => VideoModel) 51 @ForeignKey(() => VideoModel)
48 @Column 52 @Column
49 videoId: number 53 videoId: number
@@ -88,7 +92,7 @@ export class ThumbnailModel extends Model<ThumbnailModel> {
88 } 92 }
89 93
90 @AfterDestroy 94 @AfterDestroy
91 static removeFilesAndSendDelete (instance: ThumbnailModel) { 95 static removeFiles (instance: ThumbnailModel) {
92 logger.info('Removing %s file %s.', ThumbnailModel.types[instance.type].label, instance.filename) 96 logger.info('Removing %s file %s.', ThumbnailModel.types[instance.type].label, instance.filename)
93 97
94 // Don't block the transaction 98 // Don't block the transaction