mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Remove extra 'next page' button at then end of a playlist
This commit is contained in:
parent
3e88b72316
commit
23e5b6ba72
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1 pure-u-lg-3-5"></div>
|
<div class="pure-u-1 pure-u-lg-3-5"></div>
|
||||||
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
|
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
|
||||||
<% if videos.size == 100 %>
|
<% if page_count != 1 && page < page_count %>
|
||||||
<a href="/playlist?list=<%= playlist.id %>&page=<%= page + 1 %>">
|
<a href="/playlist?list=<%= playlist.id %>&page=<%= page + 1 %>">
|
||||||
<%= translate(locale, "Next page") %>
|
<%= translate(locale, "Next page") %>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue