]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/cache/videos-preview-cache.ts
Merge branch 'hotfix/docker' into develop
[github/Chocobozzz/PeerTube.git] / server / lib / cache / videos-preview-cache.ts
index 22b6d9cb0db82ecafd74747062ca0db8879fbe36..a5d6f5b627be39c8f619cfccc8fb96401787c85c 100644 (file)
@@ -16,7 +16,7 @@ class VideosPreviewCache extends AbstractVideoStaticFileCache <string> {
   }
 
   async getFilePath (videoUUID: string) {
-    const video = await VideoModel.loadByUUID(videoUUID)
+    const video = await VideoModel.loadByUUIDWithFile(videoUUID)
     if (!video) return undefined
 
     if (video.isOwned()) return join(CONFIG.STORAGE.PREVIEWS_DIR, video.getPreviewName())
@@ -25,7 +25,7 @@ class VideosPreviewCache extends AbstractVideoStaticFileCache <string> {
   }
 
   protected async loadRemoteFile (key: string) {
-    const video = await VideoModel.loadByUUIDAndPopulateAccountAndServerAndTags(key)
+    const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(key)
     if (!video) return undefined
 
     if (video.isOwned()) throw new Error('Cannot load remote preview of owned video.')