]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/files-cache/videos-preview-cache.ts
Add audio support in upload
[github/Chocobozzz/PeerTube.git] / server / lib / files-cache / videos-preview-cache.ts
index 14be7f24a57f75e1cfa63deb6548519e31806b4e..a68619d076da9372bd6c6b00ad056d6da6e1b626 100644 (file)
@@ -21,7 +21,7 @@ class VideosPreviewCache extends AbstractVideoStaticFileCache <string> {
     const video = await VideoModel.loadByUUIDWithFile(videoUUID)
     if (!video) return undefined
 
-    if (video.isOwned()) return { isOwned: true, path: join(CONFIG.STORAGE.PREVIEWS_DIR, video.getPreview().filename) }
+    if (video.isOwned()) return { isOwned: true, path: video.getPreview().getPath() }
 
     return this.loadRemoteFile(videoUUID)
   }