Speedup .guids access for legacy agent
MODIFY
plex_trakt_sync/plex_api.py
plex_trakt_sync/plex_api.py
@@ -100,9 +100,14 @@ def guid(self):
@property
@memoize
def guids(self):
+ # return early if legacy agent
+ # accessing .guids for legacy agent
+ # will make another round-trip to plex server
+ # and the result is always empty.
+ if not self.item.guid.startswith('plex://'):
+ return [self.guid]
+
guids = [PlexGuid(guid.id, self.type, self) for guid in self.item.guids]
- if not guids:
- guids = [self.guid]
# take guid in this order:
# - tmdb, tvdb, then imdb

Speedup .guids access for legacy agent