From 3733fe827268887733ea99d8740c78547e176343 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 6 Oct 2018 22:18:50 -0500 Subject: [PATCH] Redirect mixes --- src/invidious.cr | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/invidious.cr b/src/invidious.cr index 4501efd8..5526b089 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -402,6 +402,10 @@ get "/playlist" do |env| page = env.params.query["page"]?.try &.to_i? page ||= 1 + if plid.starts_with? "RD" + next env.redirect "/mix?list=#{plid}" + end + begin playlist = fetch_playlist(plid) rescue ex @@ -2927,6 +2931,10 @@ get "/api/v1/playlists/:plid" do |env| page = env.params.query["page"]?.try &.to_i? page ||= 1 + if plid.starts_with? "RD" + next env.redirect "/api/v1/mixes/#{plid}" + end + begin playlist = fetch_playlist(plid) rescue ex