Invidious is an alternative front-end to YouTube
Skip DASH streams segmented by URL
Omar Roth8ed1c77e47d4
diff --git a/src/invidious/videos.cr b/src/invidious/videos.crindex 9af45851..dea03163 100644--- a/src/invidious/videos.cr+++ b/src/invidious/videos.cr@@ -583,6 +583,9 @@ struct Videofmt["url"] = JSON::Any.new("#{fmt["url"]}&host=#{URI.parse(fmt["url"].as_s).host}")fmt["url"] = JSON::Any.new("#{fmt["url"]}®ion=#{self.info["region"]}") if self.info["region"]?end+ # See https://github.com/TeamNewPipe/NewPipe/issues/2415+ # Some streams are segmented by URL `sq/` rather than index, for now we just filter them out+ fmt_stream.reject! { |f| !f["indexRange"]? }fmt_stream.sort_by! { |f| f["width"]?.try &.as_i || 0 }@adaptive_fmts = fmt_streamreturn @adaptive_fmts.as(Array(Hash(String, JSON::Any)))