From 73247d75caa470b7c68cb117f252d3583b8b8d48 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sun, 15 Jul 2018 21:53:24 -0500 Subject: [PATCH] Add fix for mimetype in /videoplayback --- src/invidious.cr | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/invidious.cr b/src/invidious.cr index 766dacce..dacefad4 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -998,6 +998,12 @@ get "/videoplayback*" do |env| if path != "/videoplayback" path = path.lchop("/videoplayback/") path = path.rchop("/") + + path = path.gsub(/mime\/\w+\/\w+/) do |mimetype| + mimetype = mimetype.split("/") + mimetype[0] + "/" + mimetype[1] + "%2F" + mimetype[2] + end + path = path.split("/") raw_params = {} of String => Array(String)