]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/update-host.ts
Translated using Weblate (Catalan)
[github/Chocobozzz/PeerTube.git] / scripts / update-host.ts
index a946d2e4229523a4f5278d6999ef8e8500588a98..54b31d7865814267ed0fcb85798280f0d40fa7cb 100755 (executable)
@@ -19,6 +19,7 @@ import { AccountModel } from '../server/models/account/account'
 import { VideoChannelModel } from '../server/models/video/video-channel'
 import { VideoStreamingPlaylistModel } from '../server/models/video/video-streaming-playlist'
 import { initDatabaseModels } from '../server/initializers'
+import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
 
 run()
   .then(() => process.exit(0))
@@ -124,7 +125,7 @@ async function run () {
 
     for (const file of video.VideoFiles) {
       console.log('Updating torrent file %s of video %s.', file.resolution, video.uuid)
-      await video.createTorrentAndSetInfoHash(file)
+      await createTorrentAndSetInfoHash(video, file)
     }
 
     for (const playlist of video.VideoStreamingPlaylists) {