This commit is contained in:
diogo 2021-07-17 01:50:53 +02:00 committed by Samantaz Fox
parent 440105976f
commit 65e45c4079
No known key found for this signature in database
GPG key ID: F42821059186176E

View file

@ -439,7 +439,7 @@ def get_playlist_videos(db, playlist, offset, locale = nil, continuation = nil)
else
videos = [] of PlaylistVideo
until videos.size >= 50 || videos.size == playlist.video_count || offset >= playlist.video_count
until videos.size >= 50 || videos.size == playlist.video_count || offset >= playlist.video_count
if offset >= 100
# Normalize offset to match youtube's behavior (100 videos chunck per request)
normalized_offset = (offset / 100).to_i64 * 100_i64