X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fupdate-host.ts;h=54b31d7865814267ed0fcb85798280f0d40fa7cb;hb=1def3c526ec385cbd2112d9907e8a4a73af110ca;hp=57919b9981a4f40bf27b48bb541d1738466aa0e1;hpb=74dc3bca2b14f5fd3fe80c394dfc34177a46db77;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/update-host.ts b/scripts/update-host.ts index 57919b998..54b31d786 100755 --- a/scripts/update-host.ts +++ b/scripts/update-host.ts @@ -1,3 +1,6 @@ +import { registerTSPaths } from '../server/helpers/register-ts-paths' +registerTSPaths() + import { WEBSERVER } from '../server/initializers/constants' import { ActorFollowModel } from '../server/models/activitypub/actor-follow' import { VideoModel } from '../server/models/video/video' @@ -16,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)) @@ -121,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) {