]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/optimize-old-videos.ts
Fix h265 video import using CLI
[github/Chocobozzz/PeerTube.git] / scripts / optimize-old-videos.ts
index d5696de670ba548fb4feb1ded07a4c1539dc9ef5..01d30244fb62fe5f58bf73064f404791735ed35b 100644 (file)
@@ -34,7 +34,9 @@ async function run () {
 
   const localVideos = await VideoModel.listLocal()
 
-  for (const video of localVideos) {
+  for (const localVideo of localVideos) {
+    const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(localVideo.id)
+
     currentVideoId = video.id
 
     for (const file of video.VideoFiles) {