aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/schedulers/videos-redundancy-scheduler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/schedulers/videos-redundancy-scheduler.ts')
-rw-r--r--server/lib/schedulers/videos-redundancy-scheduler.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts
index 60008e695..9e2667416 100644
--- a/server/lib/schedulers/videos-redundancy-scheduler.ts
+++ b/server/lib/schedulers/videos-redundancy-scheduler.ts
@@ -1,6 +1,7 @@
1import { move } from 'fs-extra' 1import { move } from 'fs-extra'
2import { join } from 'path' 2import { join } from 'path'
3import { getServerActor } from '@server/models/application/application' 3import { getServerActor } from '@server/models/application/application'
4import { TrackerModel } from '@server/models/server/tracker'
4import { VideoModel } from '@server/models/video/video' 5import { VideoModel } from '@server/models/video/video'
5import { 6import {
6 MStreamingPlaylist, 7 MStreamingPlaylist,
@@ -221,8 +222,8 @@ export class VideosRedundancyScheduler extends AbstractScheduler {
221 222
222 logger.info('Duplicating %s - %d in videos redundancy with "%s" strategy.', video.url, file.resolution, strategy) 223 logger.info('Duplicating %s - %d in videos redundancy with "%s" strategy.', video.url, file.resolution, strategy)
223 224
224 const { baseUrlHttp, baseUrlWs } = video.getBaseUrls() 225 const trackerUrls = await TrackerModel.listUrlsByVideoId(video.id)
225 const magnetUri = generateMagnetUri(video, video, file, baseUrlHttp, baseUrlWs) 226 const magnetUri = generateMagnetUri(video, file, trackerUrls)
226 227
227 const tmpPath = await downloadWebTorrentVideo({ magnetUri }, VIDEO_IMPORT_TIMEOUT) 228 const tmpPath = await downloadWebTorrentVideo({ magnetUri }, VIDEO_IMPORT_TIMEOUT)
228 229