Add has_plex_token factory property
MODIFY
plextraktsync/factory.py
plextraktsync/factory.py
@@ -41,6 +41,13 @@ def plex_server(self):
token=server.token,
)
+ @cached_property
+ def has_plex_token(self):
+ try:
+ return self.server_config.token is not None
+ except RuntimeError:
+ return False
+
@cached_property
def server_config(self):
from plextraktsync.config.ServerConfig import ServerConfig

Add has_plex_token factory property