diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-29 17:18:28 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-29 17:18:28 +0200 |
commit | 9e8789497377cac5554a622da605f5b89587aa9c (patch) | |
tree | e0103925951ee110bc7e94cf2f7a0904edd9d924 /server/models/video/formatter | |
parent | 88d36fe4dcd45f410f52de67c9299ad9b00c0b4e (diff) | |
parent | cd162f25d2c168d29f41bef4b9c99cb6fdfbac0a (diff) | |
download | PeerTube-9e8789497377cac5554a622da605f5b89587aa9c.tar.gz PeerTube-9e8789497377cac5554a622da605f5b89587aa9c.tar.zst PeerTube-9e8789497377cac5554a622da605f5b89587aa9c.zip |
Merge branch 'release/3.3.0' into develop
Diffstat (limited to 'server/models/video/formatter')
-rw-r--r-- | server/models/video/formatter/video-format-utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/formatter/video-format-utils.ts b/server/models/video/formatter/video-format-utils.ts index 3310b3b46..8a54de3b0 100644 --- a/server/models/video/formatter/video-format-utils.ts +++ b/server/models/video/formatter/video-format-utils.ts | |||
@@ -205,7 +205,7 @@ function videoFilesModelToFormattedJSON ( | |||
205 | ? video.getTrackerUrls() | 205 | ? video.getTrackerUrls() |
206 | : [] | 206 | : [] |
207 | 207 | ||
208 | return [ ...videoFiles ] | 208 | return (videoFiles || []) |
209 | .filter(f => !f.isLive()) | 209 | .filter(f => !f.isLive()) |
210 | .sort(sortByResolutionDesc) | 210 | .sort(sortByResolutionDesc) |
211 | .map(videoFile => { | 211 | .map(videoFile => { |
@@ -240,7 +240,7 @@ function addVideoFilesInAPAcc ( | |||
240 | ) { | 240 | ) { |
241 | const trackerUrls = video.getTrackerUrls() | 241 | const trackerUrls = video.getTrackerUrls() |
242 | 242 | ||
243 | const sortedFiles = [ ...files ] | 243 | const sortedFiles = (files || []) |
244 | .filter(f => !f.isLive()) | 244 | .filter(f => !f.isLive()) |
245 | .sort(sortByResolutionDesc) | 245 | .sort(sortByResolutionDesc) |
246 | 246 | ||