1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Remove previous thumbnail if needed

This commit is contained in:
Chocobozzz 2021-02-16 08:50:40 +01:00 committed by Chocobozzz
parent 6302d599cd
commit a35a22797c
15 changed files with 274 additions and 119 deletions

View file

@ -20,7 +20,7 @@ class VideosPreviewCache extends AbstractVideoStaticFileCache <string> {
}
async getFilePathImpl (filename: string) {
const thumbnail = await ThumbnailModel.loadWithVideoByName(filename, ThumbnailType.PREVIEW)
const thumbnail = await ThumbnailModel.loadWithVideoByFilename(filename, ThumbnailType.PREVIEW)
if (!thumbnail) return undefined
if (thumbnail.Video.isOwned()) return { isOwned: true, path: thumbnail.getPath() }