Optimize SQL requests of watch page API endpoints
[oweals/peertube.git] / scripts / create-import-video-file-job.ts
index 2b636014a6636b228cfb7b54fe9bceb610d17f8d..c8c6c642977c8719aa0aa38c7accf7aecbe0efcb 100644 (file)
@@ -25,7 +25,7 @@ run()
 async function run () {
   await initDatabaseModels(true)
 
-  const video = await VideoModel.loadByUUID(program['video'])
+  const video = await VideoModel.loadByUUIDWithFile(program['video'])
   if (!video) throw new Error('Video not found.')
   if (video.isOwned() === false) throw new Error('Cannot import files of a non owned video.')