mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 12:59:42 -07:00
Catch failed to retrieve Plex Cloud status
This commit is contained in:
parent
e0109ed179
commit
90443b4028
1 changed files with 8 additions and 4 deletions
|
@ -272,13 +272,17 @@ def connect_server(log=True, startup=False):
|
||||||
plex_tv = plextv.PlexTV()
|
plex_tv = plextv.PlexTV()
|
||||||
status = plex_tv.get_cloud_server_status()
|
status = plex_tv.get_cloud_server_status()
|
||||||
|
|
||||||
if status:
|
if status is True:
|
||||||
logger.info(u"Tautulli Monitor :: Plex Cloud server is active.")
|
logger.info(u"Tautulli Monitor :: Plex Cloud server is active.")
|
||||||
else:
|
elif status is False:
|
||||||
if log:
|
if log:
|
||||||
logger.info(u"Tautulli Monitor :: Plex Cloud server is sleeping.")
|
logger.info(u"Tautulli Monitor :: Plex Cloud server is sleeping.")
|
||||||
if startup:
|
else:
|
||||||
web_socket.on_disconnect()
|
if log:
|
||||||
|
logger.error(u"Tautulli Monitor :: Failed to retrieve Plex Cloud server status.")
|
||||||
|
|
||||||
|
if not status and startup:
|
||||||
|
web_socket.on_disconnect()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
status = True
|
status = True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue