From 5680d5a7bebbb8e3c715e7f546bce49116b4a599 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 2 Aug 2019 15:24:38 -0500 Subject: [PATCH] Sort dash representations by framerate --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index d6479002..c2de0dcf 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -4493,7 +4493,7 @@ get "/api/manifest/dash/id/:id" do |env| end audio_streams = video.audio_streams(adaptive_fmts) - video_streams = video.video_streams(adaptive_fmts) + video_streams = video.video_streams(adaptive_fmts).sort_by { |stream| stream["fps"].to_i }.reverse XML.build(indent: " ", encoding: "UTF-8") do |xml| xml.element("MPD", "xmlns": "urn:mpeg:dash:schema:mpd:2011",