diff options
| author | chunky programmer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2023-05-14 22:35:51 -0400 |
|---|---|---|
| committer | chunky programmer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2023-05-14 22:35:51 -0400 |
| commit | c713c32cebda5d0199b5c0dd553744f8d61707da (patch) | |
| tree | ecd9df7b845147d6268325932794e96765667407 /src | |
| parent | 3a54e9556b0cd28fd224db5801f8141a68108c13 (diff) | |
| download | invidious-c713c32cebda5d0199b5c0dd553744f8d61707da.tar.gz invidious-c713c32cebda5d0199b5c0dd553744f8d61707da.tar.bz2 invidious-c713c32cebda5d0199b5c0dd553744f8d61707da.zip | |
Fix issue where playlists will refetch the same videos
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/routes/playlists.cr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious/routes/playlists.cr b/src/invidious/routes/playlists.cr index 0d242ee6..8675fa45 100644 --- a/src/invidious/routes/playlists.cr +++ b/src/invidious/routes/playlists.cr @@ -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 |
