Redirect mixes

This commit is contained in:
Omar Roth 2018-10-06 22:18:50 -05:00
parent 98bb20abcd
commit 3733fe8272

View File

@ -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