diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-28 14:57:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-28 15:06:15 +0200 |
commit | 4fae2b1f300c1f027629569817262f60873a663a (patch) | |
tree | fabffae6d39aa13b19985f8c92730db2a721dceb /server/lib/files-cache | |
parent | 4c8336af67bf4e570e227d5cb1fbcb7a53b3776e (diff) | |
download | PeerTube-4fae2b1f300c1f027629569817262f60873a663a.tar.gz PeerTube-4fae2b1f300c1f027629569817262f60873a663a.tar.zst PeerTube-4fae2b1f300c1f027629569817262f60873a663a.zip |
Rename video full loading
Diffstat (limited to 'server/lib/files-cache')
-rw-r--r-- | server/lib/files-cache/videos-caption-cache.ts | 2 | ||||
-rw-r--r-- | server/lib/files-cache/videos-preview-cache.ts | 2 | ||||
-rw-r--r-- | server/lib/files-cache/videos-torrent-cache.ts | 2 |
3 files changed, 3 insertions, 3 deletions
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 <string> { | |||
35 | if (videoCaption.isOwned()) throw new Error('Cannot load remote caption of owned video.') | 35 | if (videoCaption.isOwned()) throw new Error('Cannot load remote caption of owned video.') |
36 | 36 | ||
37 | // Used to fetch the path | 37 | // Used to fetch the path |
38 | const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoCaption.videoId) | 38 | const video = await VideoModel.loadFull(videoCaption.videoId) |
39 | if (!video) return undefined | 39 | if (!video) return undefined |
40 | 40 | ||
41 | const remoteUrl = videoCaption.getFileUrl(video) | 41 | 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 <string> { | |||
30 | 30 | ||
31 | // Key is the video UUID | 31 | // Key is the video UUID |
32 | protected async loadRemoteFile (key: string) { | 32 | protected async loadRemoteFile (key: string) { |
33 | const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(key) | 33 | const video = await VideoModel.loadFull(key) |
34 | if (!video) return undefined | 34 | if (!video) return undefined |
35 | 35 | ||
36 | if (video.isOwned()) throw new Error('Cannot load remote preview of owned video.') | 36 | 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 <string> { | |||
40 | if (file.getVideo().isOwned()) throw new Error('Cannot load remote file of owned video.') | 40 | if (file.getVideo().isOwned()) throw new Error('Cannot load remote file of owned video.') |
41 | 41 | ||
42 | // Used to fetch the path | 42 | // Used to fetch the path |
43 | const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(file.getVideo().id) | 43 | const video = await VideoModel.loadFull(file.getVideo().id) |
44 | if (!video) return undefined | 44 | if (!video) return undefined |
45 | 45 | ||
46 | const remoteUrl = file.getRemoteTorrentUrl(video) | 46 | const remoteUrl = file.getRemoteTorrentUrl(video) |