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:
parent
6302d599cd
commit
a35a22797c
15 changed files with 274 additions and 119 deletions
|
@ -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() }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue