diff options
Diffstat (limited to 'scripts/update-host.ts')
-rwxr-xr-x | scripts/update-host.ts | 7 |
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 @@ | |||
1 | import { registerTSPaths } from '../server/helpers/register-ts-paths' | 1 | import { registerTSPaths } from '../server/helpers/register-ts-paths' |
2 | registerTSPaths() | ||
3 | |||
4 | import { WEBSERVER } from '../server/initializers/constants' | 2 | import { WEBSERVER } from '../server/initializers/constants' |
5 | import { ActorFollowModel } from '../server/models/activitypub/actor-follow' | 3 | import { ActorFollowModel } from '../server/models/activitypub/actor-follow' |
6 | import { VideoModel } from '../server/models/video/video' | 4 | import { VideoModel } from '../server/models/video/video' |
@@ -19,6 +17,9 @@ import { AccountModel } from '../server/models/account/account' | |||
19 | import { VideoChannelModel } from '../server/models/video/video-channel' | 17 | import { VideoChannelModel } from '../server/models/video/video-channel' |
20 | import { VideoStreamingPlaylistModel } from '../server/models/video/video-streaming-playlist' | 18 | import { VideoStreamingPlaylistModel } from '../server/models/video/video-streaming-playlist' |
21 | import { initDatabaseModels } from '../server/initializers' | 19 | import { initDatabaseModels } from '../server/initializers' |
20 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | ||
21 | |||
22 | registerTSPaths() | ||
22 | 23 | ||
23 | run() | 24 | run() |
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) { |