Fix issue where playlists will refetch the same videos

pull/3807/head
chunky programmer 2023-05-14 22:35:51 -04:00
rodzic 3a54e9556b
commit c713c32ceb
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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