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 --- scripts/create-move-video-storage-job.ts | 2 +- scripts/create-transcoding-job.ts | 2 +- scripts/migrations/peertube-4.0.ts | 2 +- scripts/update-host.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/create-move-video-storage-job.ts b/scripts/create-move-video-storage-job.ts index 18629aa27..0f0d4ee35 100644 --- a/scripts/create-move-video-storage-job.ts +++ b/scripts/create-move-video-storage-job.ts @@ -70,7 +70,7 @@ async function run () { } for (const id of ids) { - const videoFull = await VideoModel.loadAndPopulateAccountAndServerAndTags(id) + const videoFull = await VideoModel.loadFull(id) const files = videoFull.VideoFiles || [] const hls = videoFull.getHLSPlaylist() diff --git a/scripts/create-transcoding-job.ts b/scripts/create-transcoding-job.ts index 59fc84ad5..8f4d64290 100755 --- a/scripts/create-transcoding-job.ts +++ b/scripts/create-transcoding-job.ts @@ -43,7 +43,7 @@ async function run () { return } - const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(uuid) + const video = await VideoModel.loadFull(uuid) if (!video) throw new Error('Video not found.') const dataInput: VideoTranscodingPayload[] = [] diff --git a/scripts/migrations/peertube-4.0.ts b/scripts/migrations/peertube-4.0.ts index 64cf45474..9e5ca60d4 100644 --- a/scripts/migrations/peertube-4.0.ts +++ b/scripts/migrations/peertube-4.0.ts @@ -97,7 +97,7 @@ async function processVideo (videoId: number) { // Everything worked, we can save the playlist now await playlist.save() - const allVideo = await VideoModel.loadAndPopulateAccountAndServerAndTags(video.id) + const allVideo = await VideoModel.loadFull(video.id) await federateVideoIfNeeded(allVideo, false) console.log(`Successfully moved HLS files of ${video.name}.`) diff --git a/scripts/update-host.ts b/scripts/update-host.ts index bb54290a4..1d17ce152 100755 --- a/scripts/update-host.ts +++ b/scripts/update-host.ts @@ -114,7 +114,7 @@ async function run () { const ids = await VideoModel.listLocalIds() for (const id of ids) { - const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(id) + const video = await VideoModel.loadFull(id) console.log('Updating video ' + video.uuid) -- cgit v1.2.3