mirror of
https://github.com/iv-org/invidious.git
synced 2024-09-12 01:28:13 +02:00
Minor refactor
This commit is contained in:
parent
64cc0362fb
commit
53c8b5ff2e
@ -390,17 +390,13 @@ 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
|
begin
|
||||||
begin
|
videos = extract_playlist(plid, page)
|
||||||
videos = extract_playlist(plid, page)
|
rescue ex
|
||||||
rescue ex
|
error_message = ex.message
|
||||||
error_message = ex.message
|
next templated "error"
|
||||||
next templated "error"
|
|
||||||
end
|
|
||||||
playlist = fetch_playlist(plid)
|
|
||||||
else
|
|
||||||
next env.redirect "/"
|
|
||||||
end
|
end
|
||||||
|
playlist = fetch_playlist(plid)
|
||||||
|
|
||||||
templated "playlist"
|
templated "playlist"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user