mirror of
https://github.com/iv-org/invidious.git
synced 2026-09-27 03:55:27 -05:00
feat: add support for /show/ urls
This commit is contained in:
parent
2ffed4fa03
commit
df298c1161
@ -387,6 +387,7 @@ module Invidious::Routes::Playlists
|
|||||||
referer = get_referer(env)
|
referer = get_referer(env)
|
||||||
|
|
||||||
plid = env.params.query["list"]?.try &.gsub(/[^a-zA-Z0-9_-]/, "")
|
plid = env.params.query["list"]?.try &.gsub(/[^a-zA-Z0-9_-]/, "")
|
||||||
|
plid ||= env.params.url["id"]?.try &.[2..]
|
||||||
if !plid
|
if !plid
|
||||||
return env.redirect "/"
|
return env.redirect "/"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -178,6 +178,7 @@ module Invidious::Routing
|
|||||||
|
|
||||||
def register_yt_playlist_routes
|
def register_yt_playlist_routes
|
||||||
get "/playlist", Routes::Playlists, :show
|
get "/playlist", Routes::Playlists, :show
|
||||||
|
get "/show/:id", Routes::Playlists, :show
|
||||||
get "/mix", Routes::Playlists, :mix
|
get "/mix", Routes::Playlists, :mix
|
||||||
get "/watch_videos", Routes::Playlists, :watch_videos
|
get "/watch_videos", Routes::Playlists, :watch_videos
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user