From f249192ebbbbeef5b78a5b5b1c72fcb6a0679477 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 2 Aug 2018 17:18:57 -0500 Subject: [PATCH] Add redirect for '/channels/:ucid/videos' --- src/invidious.cr | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/invidious.cr b/src/invidious.cr index 9e95121a..2114180c 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2724,6 +2724,19 @@ get "/channel/:ucid" do |env| templated "channel" end +get "/channel/:ucid/videos" do |env| + ucid = env.params.url["ucid"] + params = env.request.query + + if !params || params.empty? + params = "" + else + params = "?#{params}" + end + + env.redirect "/channel/#{ucid}#{params}" +end + get "/api/manifest/dash/id/:id" do |env| env.response.headers.add("Access-Control-Allow-Origin", "*") env.response.content_type = "application/dash+xml"