diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-05-26 18:55:22 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-05-26 18:55:22 -0500 |
| commit | 71cd8918bea41c266d6f4fa8a934cca20577869b (patch) | |
| tree | 9bba7edd42726cd88b8266d28eef8afa247ba6eb | |
| parent | c049ba59ff1a9c7f7608b94cff30cc840ed13c75 (diff) | |
| download | invidious-71cd8918bea41c266d6f4fa8a934cca20577869b.tar.gz invidious-71cd8918bea41c266d6f4fa8a934cca20577869b.tar.bz2 invidious-71cd8918bea41c266d6f4fa8a934cca20577869b.zip | |
Fix URI for storyboard extractor
| -rw-r--r-- | src/invidious/videos.cr | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 0a468fa3..f5958017 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -721,10 +721,13 @@ struct Video return items end - url = storyboards.shift + url = URI.parse(storyboards.shift) + params = HTTP::Params.parse(url.query || "") storyboards.each_with_index do |storyboard, i| width, height, count, storyboard_width, storyboard_height, interval, _, sigh = storyboard.split("#") + params["sigh"] = sigh + url.query = params.to_s width = width.to_i height = height.to_i @@ -734,7 +737,7 @@ struct Video storyboard_height = storyboard_height.to_i items << { - url: "#{url}&sigh=#{sigh}".sub("$L", i).sub("$N", "M$M"), + url: url.to_s.sub("$L", i).sub("$N", "M$M"), width: width, height: height, count: count, |
