Merge pull request #1967 from SamantazFox/fix-long-playlists-2

Fix missing last page in playlists
This commit is contained in:
TheFrenchGhosty 2021-04-01 19:51:33 +00:00 committed by GitHub
commit 4b6d0fb517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -434,7 +434,7 @@ class Invidious::Routes::Playlists < Invidious::Routes::BaseRoute
end end
page_count = (playlist.video_count / 100).to_i page_count = (playlist.video_count / 100).to_i
page_count = 1 if page_count == 0 page_count += 1 if (playlist.video_count % 100) > 0
if page > page_count if page > page_count
return env.redirect "/playlist?list=#{plid}&page=#{page_count}" return env.redirect "/playlist?list=#{plid}&page=#{page_count}"