|
|
@ -433,6 +433,13 @@ class Invidious::Routes::Playlists < Invidious::Routes::BaseRoute
|
|
|
|
return error_template(500, ex)
|
|
|
|
return error_template(500, ex)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
page_count = (playlist.video_count / 100).to_i
|
|
|
|
|
|
|
|
page_count = 1 if page_count == 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if page > page_count
|
|
|
|
|
|
|
|
return env.redirect "/playlist?list=#{plid}&page=#{page_count}"
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
if playlist.privacy == PlaylistPrivacy::Private && playlist.author != user.try &.email
|
|
|
|
if playlist.privacy == PlaylistPrivacy::Private && playlist.author != user.try &.email
|
|
|
|
return error_template(403, "This playlist is private.")
|
|
|
|
return error_template(403, "This playlist is private.")
|
|
|
|
end
|
|
|
|
end
|
|
|
|