Add movies and shows accessors
MODIFY
plex_trakt_sync/plex_api.py
plex_trakt_sync/plex_api.py
@@ -11,6 +11,28 @@ class PlexApi:
def __init__(self, plex_server):
self.plex_server = plex_server
+ @property
+ @memoize
+ def movie_sections(self):
+ result = []
+ for section in self.library_sections:
+ if not type(section) is MovieSection:
+ continue
+ result.append(section)
+
+ return result
+
+ @property
+ @memoize
+ def show_sections(self):
+ result = []
+ for section in self.library_sections:
+ if not type(section) is ShowSection:
+ continue
+ result.append(section)
+
+ return result
+
@property
@memoize
@nocache

Add movies and shows accessors