diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-08-07 13:14:58 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-08-07 13:14:58 -0500 |
| commit | 0b363ff471674da89d04713ff9ebdde2efe7ce12 (patch) | |
| tree | 4e7da54bb222120da4f48164eeeaf4b98eeca858 | |
| parent | a3a826e52cf163ce57c1ee62618894372947c3bc (diff) | |
| download | invidious-0b363ff471674da89d04713ff9ebdde2efe7ce12.tar.gz invidious-0b363ff471674da89d04713ff9ebdde2efe7ce12.tar.bz2 invidious-0b363ff471674da89d04713ff9ebdde2efe7ce12.zip | |
Chop leading slash from local URLs
| -rw-r--r-- | src/invidious.cr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 82cdbc2f..6e97c70e 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2566,7 +2566,7 @@ get "/api/manifest/dash/id/:id" do |env| url = url.rchop("</BaseURL>") if local - url = URI.parse(url).full_path + url = URI.parse(url).full_path.lchop("/") end "<BaseURL>#{url}</BaseURL>" @@ -2579,7 +2579,7 @@ get "/api/manifest/dash/id/:id" do |env| if local adaptive_fmts.each do |fmt| - fmt["url"] = URI.parse(fmt["url"]).full_path + fmt["url"] = URI.parse(fmt["url"]).full_path.lchop("/") end end |
