From 65af03a241aa83ab7ba71278b6c99acd26428b8a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 1 Aug 2019 16:54:24 +0200 Subject: Automatically update playlist thumbnails --- server/models/video/thumbnail.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'server/models/video/thumbnail.ts') 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 { @Column fileUrl: string + @AllowNull(true) + @Column + automaticallyGenerated: boolean + @ForeignKey(() => VideoModel) @Column videoId: number @@ -88,7 +92,7 @@ export class ThumbnailModel extends Model { } @AfterDestroy - static removeFilesAndSendDelete (instance: ThumbnailModel) { + static removeFiles (instance: ThumbnailModel) { logger.info('Removing %s file %s.', ThumbnailModel.types[instance.type].label, instance.filename) // Don't block the transaction -- cgit v1.2.3