]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/update-host.ts
Deprecate old static routes
[github/Chocobozzz/PeerTube.git] / scripts / update-host.ts
index a946d2e4229523a4f5278d6999ef8e8500588a98..2efe326a2b03cdafe95e3ee1345c95476153988d 100755 (executable)
@@ -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) {