Update movie_sections/show_sections to support filter by library name
@@ -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
