diff options
Diffstat (limited to 'server/models/video/thumbnail.ts')
-rw-r--r-- | server/models/video/thumbnail.ts | 6 |
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 |