Add has_sessions method
MODIFY
plextraktsync/plex_api.py
plextraktsync/plex_api.py
@@ -573,6 +573,14 @@ def history(self, m, device=False, account=False):
def mark_watched(self, m):
m.markWatched()
+ @nocache
+ def has_sessions(self):
+ try:
+ self.plex.sessions()
+ return True
+ except Unauthorized:
+ return False
+
@nocache
def get_sessions(self):
return self.plex.sessions()

Add has_sessions method