Remove memoize and results collection in section items
The .items is called only once, and remove buffering.
This should make user progress reporting more interactive.
MODIFY
plex_trakt_sync/plex_api.py
plex_trakt_sync/plex_api.py
@@ -123,9 +123,7 @@ def title(self):
def all(self):
return self.section.all()
- @memoize
def items(self):
- result = []
for item in (PlexLibraryItem(x) for x in self.all()):
try:
provider = item.provider
@@ -140,9 +138,7 @@ def items(self):
logger.error(f"{item}: Unable to parse a valid provider from guid:'{item.guid}', guids:{item.guids}")
continue
- result.append(item)
-
- return result
+ yield item
class PlexApi:

Remove memoize and results collection in section items

The .items is called only once, and remove buffering.
This should make user progress reporting more interactive.