diff options
Diffstat (limited to 'server/models/video/video-format-utils.ts')
-rw-r--r-- | server/models/video/video-format-utils.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index 9dc3e7722..455597d22 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts | |||
@@ -188,9 +188,12 @@ function sortByResolutionDesc (fileA: MVideoFile, fileB: MVideoFile) { | |||
188 | 188 | ||
189 | function videoFilesModelToFormattedJSON ( | 189 | function videoFilesModelToFormattedJSON ( |
190 | video: MVideoFormattableDetails, | 190 | video: MVideoFormattableDetails, |
191 | videoFiles: MVideoFileRedundanciesOpt[] | 191 | videoFiles: MVideoFileRedundanciesOpt[], |
192 | includeMagnet = true | ||
192 | ): VideoFile[] { | 193 | ): VideoFile[] { |
193 | const trackerUrls = video.getTrackerUrls() | 194 | const trackerUrls = includeMagnet |
195 | ? video.getTrackerUrls() | ||
196 | : [] | ||
194 | 197 | ||
195 | return [ ...videoFiles ] | 198 | return [ ...videoFiles ] |
196 | .filter(f => !f.isLive()) | 199 | .filter(f => !f.isLive()) |
@@ -202,8 +205,9 @@ function videoFilesModelToFormattedJSON ( | |||
202 | label: videoFile.resolution + 'p' | 205 | label: videoFile.resolution + 'p' |
203 | }, | 206 | }, |
204 | 207 | ||
205 | // FIXME: deprecated in 3.2 | 208 | magnetUri: includeMagnet |
206 | magnetUri: generateMagnetUri(video, videoFile, trackerUrls), | 209 | ? generateMagnetUri(video, videoFile, trackerUrls) |
210 | : undefined, | ||
207 | 211 | ||
208 | size: videoFile.size, | 212 | size: videoFile.size, |
209 | fps: videoFile.fps, | 213 | fps: videoFile.fps, |