Update movie_sections/show_sections to support filter by library name
MODIFY
plex_trakt_sync/plex_api.py
plex_trakt_sync/plex_api.py
@@ -172,21 +172,25 @@ def __init__(self, plex):
self.plex = plex
@memoize
- def movie_sections(self):
+ def movie_sections(self, library=None):
result = []
for section in self.library_sections:
if not type(section) is MovieSection:
continue
+ if library and section.title != library:
+ continue
result.append(PlexLibrarySection(section))
return result
@memoize
- def show_sections(self):
+ def show_sections(self, library=None):
result = []
for section in self.library_sections:
if not type(section) is ShowSection:
continue
+ if library and section.title != library:
+ continue
result.append(PlexLibrarySection(section))
return result

Update movie_sections/show_sections to support filter by library name