diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-03-11 12:55:05 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-03-11 12:55:09 -0500 |
| commit | 11ff40bcd68f4941fa40017f0bb6f5a8826effa1 (patch) | |
| tree | 8f839cafefb2c0f8f195fb2883e78f6a2afaa329 /src | |
| parent | 46e985b306b06fe37cd066cc1ecd69b504316fb0 (diff) | |
| download | invidious-11ff40bcd68f4941fa40017f0bb6f5a8826effa1.tar.gz invidious-11ff40bcd68f4941fa40017f0bb6f5a8826effa1.tar.bz2 invidious-11ff40bcd68f4941fa40017f0bb6f5a8826effa1.zip | |
Fix paths for 'local=true&raw=1'
Diffstat (limited to '')
| -rw-r--r-- | src/invidious.cr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 998b9291..c89c6771 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -405,8 +405,8 @@ get "/watch" do |env| adaptive_fmts = video.adaptive_fmts(decrypt_function) if params[:local] - fmt_stream.each { |fmt| fmt["url"] = URI.parse(fmt["url"]).query.not_nil! } - adaptive_fmts.each { |fmt| fmt["url"] = URI.parse(fmt["url"]).query.not_nil! } + fmt_stream.each { |fmt| fmt["url"] = URI.parse(fmt["url"]).full_path } + adaptive_fmts.each { |fmt| fmt["url"] = URI.parse(fmt["url"]).full_path } end video_streams = video.video_streams(adaptive_fmts) @@ -511,8 +511,8 @@ get "/embed/:id" do |env| adaptive_fmts = video.adaptive_fmts(decrypt_function) if params[:local] - fmt_stream.each { |fmt| fmt["url"] = URI.parse(fmt["url"]).query.not_nil! } - adaptive_fmts.each { |fmt| fmt["url"] = URI.parse(fmt["url"]).query.not_nil! } + fmt_stream.each { |fmt| fmt["url"] = URI.parse(fmt["url"]).full_path } + adaptive_fmts.each { |fmt| fmt["url"] = URI.parse(fmt["url"]).full_path } end video_streams = video.video_streams(adaptive_fmts) |
