Rename PlexApi.get_sessions() to sessions property
MODIFY
plextraktsync/plex/PlexApi.py
plextraktsync/plex/PlexApi.py
@@ -214,7 +214,8 @@ def has_sessions(self):
except Unauthorized:
return False
- def get_sessions(self):
+ @property
+ def sessions(self):
return self.plex.sessions()
@cached_property

MODIFY
plextraktsync/plex/SessionCollection.py
plextraktsync/plex/SessionCollection.py
@@ -21,7 +21,6 @@ def __missing__(self, key: str):
return self[key]
def update_sessions(self):
- sessions = self.plex.get_sessions()
self.clear()
- for session in sessions:
+ for session in self.plex.sessions:
self[str(session.sessionKey)] = session.usernames[0]

Rename PlexApi.get_sessions() to sessions property