aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/update-host.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-11-15 15:06:03 +0100
committerChocobozzz <me@florianbigard.com>2019-11-25 10:59:43 +0100
commitd7a25329f9e607894d29ab342b9cb66638b56dc0 (patch)
tree6cd6bc4f2689f78944238b313c93427423a932ac /scripts/update-host.ts
parent14981d7331da3f63fe6cfaf020ccb7c910006eaf (diff)
downloadPeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.gz
PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.zst
PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.zip
Add ability to disable webtorrent
In favour of HLS
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) {