summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@protonmail.com>2020-07-04 14:17:46 -0400
committerOmar Roth <omarroth@protonmail.com>2020-07-04 14:17:46 -0400
commit8ed1c77e47d489637bebc48e556a4ca525bbd65d (patch)
tree42574e31261e64200aa47d2b035970eb67266c9b /src
parent8c65b8c16fe06375b7b8c29514a065626a12fe04 (diff)
downloadinvidious-8ed1c77e47d489637bebc48e556a4ca525bbd65d.tar.gz
invidious-8ed1c77e47d489637bebc48e556a4ca525bbd65d.tar.bz2
invidious-8ed1c77e47d489637bebc48e556a4ca525bbd65d.zip
Skip DASH streams segmented by URL
Diffstat (limited to 'src')
-rw-r--r--src/invidious/videos.cr3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr
index 9af45851..dea03163 100644
--- a/src/invidious/videos.cr
+++ b/src/invidious/videos.cr
@@ -583,6 +583,9 @@ struct Video
fmt["url"] = JSON::Any.new("#{fmt["url"]}&host=#{URI.parse(fmt["url"].as_s).host}")
fmt["url"] = JSON::Any.new("#{fmt["url"]}&region=#{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_stream
return @adaptive_fmts.as(Array(Hash(String, JSON::Any)))