From d9a2a03196275065c28f4a0b7d4d7bc9992d77a1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Feb 2021 10:15:11 +0100 Subject: Don't guess remote tracker URL --- server/lib/schedulers/videos-redundancy-scheduler.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/lib/schedulers') 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 @@ import { move } from 'fs-extra' import { join } from 'path' import { getServerActor } from '@server/models/application/application' +import { TrackerModel } from '@server/models/server/tracker' import { VideoModel } from '@server/models/video/video' import { MStreamingPlaylist, @@ -221,8 +222,8 @@ export class VideosRedundancyScheduler extends AbstractScheduler { logger.info('Duplicating %s - %d in videos redundancy with "%s" strategy.', video.url, file.resolution, strategy) - const { baseUrlHttp, baseUrlWs } = video.getBaseUrls() - const magnetUri = generateMagnetUri(video, video, file, baseUrlHttp, baseUrlWs) + const trackerUrls = await TrackerModel.listUrlsByVideoId(video.id) + const magnetUri = generateMagnetUri(video, file, trackerUrls) const tmpPath = await downloadWebTorrentVideo({ magnetUri }, VIDEO_IMPORT_TIMEOUT) -- cgit v1.2.3