X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fupdate-host.ts;h=2efe326a2b03cdafe95e3ee1345c95476153988d;hb=923ff87da2761fd88a8ca269ac1ef403abb583d2;hp=a946d2e4229523a4f5278d6999ef8e8500588a98;hpb=2aaa1a3fdc49be77aec5309dab5507865c38d392;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/update-host.ts b/scripts/update-host.ts index a946d2e42..2efe326a2 100755 --- a/scripts/update-host.ts +++ b/scripts/update-host.ts @@ -11,14 +11,15 @@ import { getVideoAnnounceActivityPubUrl, getVideoChannelActivityPubUrl, getVideoCommentActivityPubUrl -} from '../server/lib/activitypub' +} from '../server/lib/activitypub/url' import { VideoShareModel } from '../server/models/video/video-share' import { VideoCommentModel } from '../server/models/video/video-comment' -import { getServerActor } from '../server/helpers/utils' 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 { initDatabaseModels } from '../server/initializers/database' +import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' +import { getServerActor } from '@server/models/application/application' 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) {