aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/update-host.ts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/update-host.ts')
-rwxr-xr-xscripts/update-host.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/update-host.ts b/scripts/update-host.ts
index a946d2e42..d9192d554 100755
--- a/scripts/update-host.ts
+++ b/scripts/update-host.ts
@@ -1,6 +1,4 @@
1import { registerTSPaths } from '../server/helpers/register-ts-paths' 1import { registerTSPaths } from '../server/helpers/register-ts-paths'
2registerTSPaths()
3
4import { WEBSERVER } from '../server/initializers/constants' 2import { WEBSERVER } from '../server/initializers/constants'
5import { ActorFollowModel } from '../server/models/activitypub/actor-follow' 3import { ActorFollowModel } from '../server/models/activitypub/actor-follow'
6import { VideoModel } from '../server/models/video/video' 4import { VideoModel } from '../server/models/video/video'
@@ -19,6 +17,9 @@ import { AccountModel } from '../server/models/account/account'
19import { VideoChannelModel } from '../server/models/video/video-channel' 17import { VideoChannelModel } from '../server/models/video/video-channel'
20import { VideoStreamingPlaylistModel } from '../server/models/video/video-streaming-playlist' 18import { VideoStreamingPlaylistModel } from '../server/models/video/video-streaming-playlist'
21import { initDatabaseModels } from '../server/initializers' 19import { initDatabaseModels } from '../server/initializers'
20import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
21
22registerTSPaths()
22 23
23run() 24run()
24 .then(() => process.exit(0)) 25 .then(() => process.exit(0))
@@ -124,7 +125,7 @@ async function run () {
124 125
125 for (const file of video.VideoFiles) { 126 for (const file of video.VideoFiles) {
126 console.log('Updating torrent file %s of video %s.', file.resolution, video.uuid) 127 console.log('Updating torrent file %s of video %s.', file.resolution, video.uuid)
127 await video.createTorrentAndSetInfoHash(file) 128 await createTorrentAndSetInfoHash(video, file)
128 } 129 }
129 130
130 for (const playlist of video.VideoStreamingPlaylists) { 131 for (const playlist of video.VideoStreamingPlaylists) {