From 4fae2b1f300c1f027629569817262f60873a663a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Jun 2022 14:57:51 +0200 Subject: Rename video full loading --- server/lib/files-cache/videos-caption-cache.ts | 2 +- server/lib/files-cache/videos-preview-cache.ts | 2 +- server/lib/files-cache/videos-torrent-cache.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'server/lib/files-cache') diff --git a/server/lib/files-cache/videos-caption-cache.ts b/server/lib/files-cache/videos-caption-cache.ts index 58e2260b6..2927c37eb 100644 --- a/server/lib/files-cache/videos-caption-cache.ts +++ b/server/lib/files-cache/videos-caption-cache.ts @@ -35,7 +35,7 @@ class VideosCaptionCache extends AbstractVideoStaticFileCache { if (videoCaption.isOwned()) throw new Error('Cannot load remote caption of owned video.') // Used to fetch the path - const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoCaption.videoId) + const video = await VideoModel.loadFull(videoCaption.videoId) if (!video) return undefined const remoteUrl = videoCaption.getFileUrl(video) diff --git a/server/lib/files-cache/videos-preview-cache.ts b/server/lib/files-cache/videos-preview-cache.ts index dd3a84aca..b7a8d6105 100644 --- a/server/lib/files-cache/videos-preview-cache.ts +++ b/server/lib/files-cache/videos-preview-cache.ts @@ -30,7 +30,7 @@ class VideosPreviewCache extends AbstractVideoStaticFileCache { // Key is the video UUID protected async loadRemoteFile (key: string) { - const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(key) + const video = await VideoModel.loadFull(key) if (!video) return undefined if (video.isOwned()) throw new Error('Cannot load remote preview of owned video.') diff --git a/server/lib/files-cache/videos-torrent-cache.ts b/server/lib/files-cache/videos-torrent-cache.ts index 23217f140..c8188b79f 100644 --- a/server/lib/files-cache/videos-torrent-cache.ts +++ b/server/lib/files-cache/videos-torrent-cache.ts @@ -40,7 +40,7 @@ class VideosTorrentCache extends AbstractVideoStaticFileCache { if (file.getVideo().isOwned()) throw new Error('Cannot load remote file of owned video.') // Used to fetch the path - const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(file.getVideo().id) + const video = await VideoModel.loadFull(file.getVideo().id) if (!video) return undefined const remoteUrl = file.getRemoteTorrentUrl(video) -- cgit v1.2.3