diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-16 08:50:40 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-02-16 10:36:44 +0100 |
commit | a35a22797c99f17924347da9a226068c3dbe4787 (patch) | |
tree | affb713929145f90f6bda8828ded3ac2f4f73b19 /server/lib/files-cache/videos-preview-cache.ts | |
parent | 6302d599cdf98b5a5363a2a1dcdc266447950191 (diff) | |
download | PeerTube-a35a22797c99f17924347da9a226068c3dbe4787.tar.gz PeerTube-a35a22797c99f17924347da9a226068c3dbe4787.tar.zst PeerTube-a35a22797c99f17924347da9a226068c3dbe4787.zip |
Remove previous thumbnail if needed
Diffstat (limited to 'server/lib/files-cache/videos-preview-cache.ts')
-rw-r--r-- | server/lib/files-cache/videos-preview-cache.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/lib/files-cache/videos-preview-cache.ts b/server/lib/files-cache/videos-preview-cache.ts index 47488da74..ee72cd3f9 100644 --- a/server/lib/files-cache/videos-preview-cache.ts +++ b/server/lib/files-cache/videos-preview-cache.ts | |||
@@ -20,7 +20,7 @@ class VideosPreviewCache extends AbstractVideoStaticFileCache <string> { | |||
20 | } | 20 | } |
21 | 21 | ||
22 | async getFilePathImpl (filename: string) { | 22 | async getFilePathImpl (filename: string) { |
23 | const thumbnail = await ThumbnailModel.loadWithVideoByName(filename, ThumbnailType.PREVIEW) | 23 | const thumbnail = await ThumbnailModel.loadWithVideoByFilename(filename, ThumbnailType.PREVIEW) |
24 | if (!thumbnail) return undefined | 24 | if (!thumbnail) return undefined |
25 | 25 | ||
26 | if (thumbnail.Video.isOwned()) return { isOwned: true, path: thumbnail.getPath() } | 26 | if (thumbnail.Video.isOwned()) return { isOwned: true, path: thumbnail.getPath() } |