Skip to content

Commit

Permalink
Removed the need for last_container_size pkkid#1393
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham Thompson committed Apr 9, 2024
1 parent da82cc0 commit 7f183d7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions plexapi/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ def fetchItems(self, ekey, cls=None, container_start=None, container_size=None,

results.extend(subresults)

last_container_size = container_size
container_start += container_size

if container_start > total_size:
break

wanted_number_of_items = total_size - offset
if maxresults is not None:
Expand All @@ -293,11 +296,6 @@ def fetchItems(self, ekey, cls=None, container_start=None, container_size=None,
if wanted_number_of_items <= len(results):
break

container_start += last_container_size

if container_start > total_size:
break

return results

def fetchItem(self, ekey, cls=None, **kwargs):
Expand Down

0 comments on commit 7f183d7

Please sign in to comment.