|
|
|
@ -151,14 +151,10 @@ module Invidious::Routes::Playlists
|
|
|
|
|
page = env.params.query["page"]?.try &.to_i?
|
|
|
|
|
page ||= 1
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
playlist = Invidious::Database::Playlists.select(id: plid, raise_on_fail: true)
|
|
|
|
|
playlist = Invidious::Database::Playlists.select(id: plid)
|
|
|
|
|
if !playlist || playlist.author != user.email
|
|
|
|
|
return env.redirect referer
|
|
|
|
|
end
|
|
|
|
|
rescue ex
|
|
|
|
|
return env.redirect referer
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
videos = get_playlist_videos(playlist, offset: (page - 1) * 100, locale: locale)
|
|
|
|
@ -235,14 +231,10 @@ module Invidious::Routes::Playlists
|
|
|
|
|
page = env.params.query["page"]?.try &.to_i?
|
|
|
|
|
page ||= 1
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
playlist = Invidious::Database::Playlists.select(id: plid, raise_on_fail: true)
|
|
|
|
|
playlist = Invidious::Database::Playlists.select(id: plid)
|
|
|
|
|
if !playlist || playlist.author != user.email
|
|
|
|
|
return env.redirect referer
|
|
|
|
|
end
|
|
|
|
|
rescue ex
|
|
|
|
|
return env.redirect referer
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
query = env.params.query["q"]?
|
|
|
|
|
if query
|
|
|
|
|