diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-04 15:31:32 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | bd54ad1953ee0484ba90cf5f588f4c282048f368 (patch) | |
tree | 36e84ed92589a8775bc18e1b056f6b8de14bf2bb /server/models/video/video-format-utils.ts | |
parent | 68e70a745b2010cd0199864a2addd60d8f99c732 (diff) | |
download | PeerTube-bd54ad1953ee0484ba90cf5f588f4c282048f368.tar.gz PeerTube-bd54ad1953ee0484ba90cf5f588f4c282048f368.tar.zst PeerTube-bd54ad1953ee0484ba90cf5f588f4c282048f368.zip |
Add live notification tests
Diffstat (limited to 'server/models/video/video-format-utils.ts')
-rw-r--r-- | server/models/video/video-format-utils.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index 04e636a15..d4b213686 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts | |||
@@ -199,6 +199,7 @@ function videoFilesModelToFormattedJSON ( | |||
199 | const video = extractVideo(model) | 199 | const video = extractVideo(model) |
200 | 200 | ||
201 | return [ ...videoFiles ] | 201 | return [ ...videoFiles ] |
202 | .filter(f => !f.isLive()) | ||
202 | .sort(sortByResolutionDesc) | 203 | .sort(sortByResolutionDesc) |
203 | .map(videoFile => { | 204 | .map(videoFile => { |
204 | return { | 205 | return { |
@@ -225,7 +226,9 @@ function addVideoFilesInAPAcc ( | |||
225 | baseUrlWs: string, | 226 | baseUrlWs: string, |
226 | files: MVideoFile[] | 227 | files: MVideoFile[] |
227 | ) { | 228 | ) { |
228 | const sortedFiles = [ ...files ].sort(sortByResolutionDesc) | 229 | const sortedFiles = [ ...files ] |
230 | .filter(f => !f.isLive()) | ||
231 | .sort(sortByResolutionDesc) | ||
229 | 232 | ||
230 | for (const file of sortedFiles) { | 233 | for (const file of sortedFiles) { |
231 | acc.push({ | 234 | acc.push({ |