Disable username filter if no permission
MODIFY
plextraktsync/commands/watch.py
plextraktsync/commands/watch.py
@@ -50,6 +50,10 @@ def __init__(self, plex: PlexApi, trakt: TraktApi, mf: MediaFactory, config: Con
self.remove_collection = config["watch"]["remove_collection"]
self.add_collection = config["watch"]["add_collection"]
if config["watch"]["username_filter"]:
+ if not self.plex.has_sessions():
+ self.logger.warning('No permission to access sessions, disabling username filter')
+ self.username_filter = None
+ else:
self.username_filter = config["PLEX_USERNAME"]
else:
self.username_filter = None

Disable username filter if no permission