Add ability to disable webtorrent

In favour of HLS
This commit is contained in:
Chocobozzz 2019-11-15 15:06:03 +01:00
parent 14981d7331
commit d7a25329f9
No known key found for this signature in database
GPG key ID: 583A612D890159BE
80 changed files with 1189 additions and 540 deletions

View file

@ -1,6 +1,4 @@
import { registerTSPaths } from '../server/helpers/register-ts-paths'
registerTSPaths()
import { WEBSERVER } from '../server/initializers/constants'
import { ActorFollowModel } from '../server/models/activitypub/actor-follow'
import { VideoModel } from '../server/models/video/video'
@ -19,6 +17,9 @@ 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 { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
registerTSPaths()
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) {