Skip to content

Commit

Permalink
Fix/improve InAdvancePagedList, from yt-dlp d37707b
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkf committed Jan 27, 2022
1 parent e0a1fe4 commit b834404
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion youtube_dl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3931,7 +3931,8 @@ def getslice(self, start=0, end=None):
res = []
start_page = start // self._pagesize
end_page = (
self._pagecount if end is None else (end // self._pagesize + 1))
self._pagecount if end is None
else min(self._pagecount, end // self._pagesize + 1))
skip_elems = start - start_page * self._pagesize
only_more = None if end is None else end - start
for pagenum in range(start_page, end_page):
Expand Down

0 comments on commit b834404

Please sign in to comment.