Add has_plex_token factory property
@@ -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
