diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-09-15 10:25:43 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-09-15 10:25:43 -0500 |
| commit | 0e1b5d7cdd2a5889fefb968f6d2ef702099b96bd (patch) | |
| tree | 80a7e239ee3d60bba334d354ef6e9621e324bb3b /src | |
| parent | d2bbf9d33c04e940e661492a03a6e0e5c5ac088d (diff) | |
| download | invidious-0e1b5d7cdd2a5889fefb968f6d2ef702099b96bd.tar.gz invidious-0e1b5d7cdd2a5889fefb968f6d2ef702099b96bd.tar.bz2 invidious-0e1b5d7cdd2a5889fefb968f6d2ef702099b96bd.zip | |
Add fix for dash sequences
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/videos.cr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 4f07a76d..668b58bf 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -258,6 +258,7 @@ class Video def adaptive_fmts(decrypt_function) adaptive_fmts = [] of HTTP::Params + if self.info.has_key?("adaptive_fmts") self.info["adaptive_fmts"].split(",") do |string| adaptive_fmts << HTTP::Params.parse(string) @@ -285,7 +286,7 @@ class Video init = segment_list.xpath_node(%q(.//initialization)) # TODO: Replace with sane defaults when byteranges are absent - if init + if init && !init["sourceurl"].starts_with? "sq" init = init["sourceurl"].lchop("range/") index = segment_list.xpath_node(%q(.//segmenturl)).not_nil!["media"] |
