Implement excluded-libraries support to library_sections
MODIFY
plex_trakt_sync/plex_api.py
plex_trakt_sync/plex_api.py
from plex_trakt_sync.main import get_plex_server
+from plex_trakt_sync.config import CONFIG
class PlexApi:
@@ -12,4 +13,10 @@ def plex_server(self):
@property
def library_sections(self):
- return self.plex_server.library.sections()
+ result = []
+ for section in self.plex_server.library.sections():
+ if section.title in CONFIG["excluded-libraries"]:
+ continue
+ result.append(section)
+
+ return result

Implement excluded-libraries support to library_sections