mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Redirect mixes
This commit is contained in:
parent
98bb20abcd
commit
3733fe8272
1 changed files with 8 additions and 0 deletions
|
@ -402,6 +402,10 @@ get "/playlist" do |env|
|
||||||
page = env.params.query["page"]?.try &.to_i?
|
page = env.params.query["page"]?.try &.to_i?
|
||||||
page ||= 1
|
page ||= 1
|
||||||
|
|
||||||
|
if plid.starts_with? "RD"
|
||||||
|
next env.redirect "/mix?list=#{plid}"
|
||||||
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
playlist = fetch_playlist(plid)
|
playlist = fetch_playlist(plid)
|
||||||
rescue ex
|
rescue ex
|
||||||
|
@ -2927,6 +2931,10 @@ get "/api/v1/playlists/:plid" do |env|
|
||||||
page = env.params.query["page"]?.try &.to_i?
|
page = env.params.query["page"]?.try &.to_i?
|
||||||
page ||= 1
|
page ||= 1
|
||||||
|
|
||||||
|
if plid.starts_with? "RD"
|
||||||
|
next env.redirect "/api/v1/mixes/#{plid}"
|
||||||
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
playlist = fetch_playlist(plid)
|
playlist = fetch_playlist(plid)
|
||||||
rescue ex
|
rescue ex
|
||||||
|
|
Loading…
Reference in a new issue