diff options
author | Chocobozzz <me@florianbigard.com> | 2019-11-15 15:06:03 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-11-25 10:59:43 +0100 |
commit | d7a25329f9e607894d29ab342b9cb66638b56dc0 (patch) | |
tree | 6cd6bc4f2689f78944238b313c93427423a932ac /scripts/update-host.ts | |
parent | 14981d7331da3f63fe6cfaf020ccb7c910006eaf (diff) | |
download | PeerTube-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-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) { |