X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fupdate-host.ts;h=54b31d7865814267ed0fcb85798280f0d40fa7cb;hb=36004aa7b0de5cb69a452090770221b192a78eb8;hp=a946d2e4229523a4f5278d6999ef8e8500588a98;hpb=2aaa1a3fdc49be77aec5309dab5507865c38d392;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/update-host.ts b/scripts/update-host.ts index a946d2e42..54b31d786 100755 --- a/scripts/update-host.ts +++ b/scripts/update-host.ts @@ -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) {