From 71cd8918bea41c266d6f4fa8a934cca20577869b Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sun, 26 May 2019 18:55:22 -0500 Subject: [PATCH] Fix URI for storyboard extractor --- src/invidious/videos.cr | 7 +++++-- 1 file 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,