diff options
Diffstat (limited to 'server/models/video/thumbnail.ts')
-rw-r--r-- | server/models/video/thumbnail.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts index cf2040cbf..f1952dcc1 100644 --- a/server/models/video/thumbnail.ts +++ b/server/models/video/thumbnail.ts | |||
@@ -100,6 +100,16 @@ export class ThumbnailModel extends Model<ThumbnailModel> { | |||
100 | .catch(err => logger.error('Cannot remove thumbnail file %s.', instance.filename, err)) | 100 | .catch(err => logger.error('Cannot remove thumbnail file %s.', instance.filename, err)) |
101 | } | 101 | } |
102 | 102 | ||
103 | static loadByName (filename: string) { | ||
104 | const query = { | ||
105 | where: { | ||
106 | filename | ||
107 | } | ||
108 | } | ||
109 | |||
110 | return ThumbnailModel.findOne(query) | ||
111 | } | ||
112 | |||
103 | static generateDefaultPreviewName (videoUUID: string) { | 113 | static generateDefaultPreviewName (videoUUID: string) { |
104 | return videoUUID + '.jpg' | 114 | return videoUUID + '.jpg' |
105 | } | 115 | } |