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'
run()
.then(() => process.exit(0))
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) {