mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Playlists: Fix duplicated videos across pages (#3807)
This commit is contained in:
commit
16ac3be85b
1 changed files with 3 additions and 3 deletions
|
@ -410,8 +410,8 @@ module Invidious::Routes::Playlists
|
|||
return error_template(500, ex)
|
||||
end
|
||||
|
||||
page_count = (playlist.video_count / 100).to_i
|
||||
page_count += 1 if (playlist.video_count % 100) > 0
|
||||
page_count = (playlist.video_count / 200).to_i
|
||||
page_count += 1 if (playlist.video_count % 200) > 0
|
||||
|
||||
if page > page_count
|
||||
return env.redirect "/playlist?list=#{plid}&page=#{page_count}"
|
||||
|
@ -422,7 +422,7 @@ module Invidious::Routes::Playlists
|
|||
end
|
||||
|
||||
begin
|
||||
videos = get_playlist_videos(playlist, offset: (page - 1) * 100)
|
||||
videos = get_playlist_videos(playlist, offset: (page - 1) * 200)
|
||||
rescue ex
|
||||
return error_template(500, "Error encountered while retrieving playlist videos.<br>#{ex.message}")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue