X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fupdate-host.ts;h=e497be4e2614b54d122d97c6d1452e54f9195e21;hb=8bf8e56e01fdea28fcb2e5418bd3f6d5a76805fa;hp=b030b21c313694858a069f53dbfdb55b2cc82af7;hpb=de94ac86a211dec657332d964693857ec235ce40;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/update-host.ts b/scripts/update-host.ts index b030b21c3..e497be4e2 100755 --- a/scripts/update-host.ts +++ b/scripts/update-host.ts @@ -116,8 +116,10 @@ async function run () { console.log('Updating video and torrent files.') - const videos = await VideoModel.listLocal() - for (const video of videos) { + const localVideos = await VideoModel.listLocal() + for (const localVideo of localVideos) { + const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(localVideo.id) + console.log('Updating video ' + video.uuid) video.url = getLocalVideoActivityPubUrl(video)