diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-09 15:04:36 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-09 15:04:36 +0200 |
commit | e2600d8b261994abbbeb1ff921edaefd267fc122 (patch) | |
tree | fb19495cb4ba502324a2318c83cd4936b956fc1c /server/models/video/thumbnail.ts | |
parent | 5bb2eb5660c87700bc70fe82219c1a84e7c7b177 (diff) | |
download | PeerTube-e2600d8b261994abbbeb1ff921edaefd267fc122.tar.gz PeerTube-e2600d8b261994abbbeb1ff921edaefd267fc122.tar.zst PeerTube-e2600d8b261994abbbeb1ff921edaefd267fc122.zip |
Add avatar to prune script
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 | } |