X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fcreate-move-video-storage-job.ts;h=13ba3c0b77b76e17feb42092ef5c5d366bafb56d;hb=91a4893063402d7beabb3104f9b989b8f88b6038;hp=7465c1ce0ec42b9a078eca7beeb805ac649b34ec;hpb=f8360396ffabd2f95e9ece9c5755173bae0114b6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/create-move-video-storage-job.ts b/scripts/create-move-video-storage-job.ts index 7465c1ce0..13ba3c0b7 100644 --- a/scripts/create-move-video-storage-job.ts +++ b/scripts/create-move-video-storage-job.ts @@ -37,7 +37,7 @@ run() async function run () { await initDatabaseModels(true) - JobQueue.Instance.init(true) + JobQueue.Instance.init() let ids: number[] = [] @@ -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() @@ -78,7 +78,7 @@ async function run () { if (files.some(f => f.storage === VideoStorage.FILE_SYSTEM) || hls?.storage === VideoStorage.FILE_SYSTEM) { console.log('Processing video %s.', videoFull.name) - const success = await moveToExternalStorageState(videoFull, false, undefined) + const success = await moveToExternalStorageState({ video: videoFull, isNewVideo: false, transaction: undefined }) if (!success) { console.error(