|
|
@ -443,7 +443,6 @@ class Plex(Library):
|
|
|
|
os.environ["PLEXAPI_PLEXAPI_TIMEOUT"] = str(self.timeout)
|
|
|
|
os.environ["PLEXAPI_PLEXAPI_TIMEOUT"] = str(self.timeout)
|
|
|
|
logger.info(f"Connected to server {self.PlexServer.friendlyName} version {self.PlexServer.version}")
|
|
|
|
logger.info(f"Connected to server {self.PlexServer.friendlyName} version {self.PlexServer.version}")
|
|
|
|
logger.info(f"Running on {self.PlexServer.platform} version {self.PlexServer.platformVersion}")
|
|
|
|
logger.info(f"Running on {self.PlexServer.platform} version {self.PlexServer.platformVersion}")
|
|
|
|
pp_str = f"PlexPass: {self.PlexServer.myPlexSubscription}"
|
|
|
|
|
|
|
|
srv_settings = self.PlexServer.settings
|
|
|
|
srv_settings = self.PlexServer.settings
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
db_cache = srv_settings.get("DatabaseCacheSize")
|
|
|
|
db_cache = srv_settings.get("DatabaseCacheSize")
|
|
|
@ -454,13 +453,21 @@ class Plex(Library):
|
|
|
|
logger.info(f"Plex DB Cache updated to {self.plex['db_cache']} MB")
|
|
|
|
logger.info(f"Plex DB Cache updated to {self.plex['db_cache']} MB")
|
|
|
|
except NotFound:
|
|
|
|
except NotFound:
|
|
|
|
logger.info(f"Plex DB cache setting: Unknown")
|
|
|
|
logger.info(f"Plex DB cache setting: Unknown")
|
|
|
|
uc_str = f"Unknown update channel."
|
|
|
|
try:
|
|
|
|
if srv_settings.get("butlerUpdateChannel").value == '16':
|
|
|
|
chl_num = srv_settings.get("butlerUpdateChannel").value
|
|
|
|
uc_str = f"Public update channel."
|
|
|
|
if chl_num == "16":
|
|
|
|
elif srv_settings.get("butlerUpdateChannel").value == '8':
|
|
|
|
uc_str = f"Public update channel."
|
|
|
|
uc_str = f"PlexPass update channel."
|
|
|
|
elif chl_num == "8":
|
|
|
|
logger.info(f"{pp_str} on {uc_str}")
|
|
|
|
uc_str = f"PlexPass update channel."
|
|
|
|
logger.info(f"Scheduled maintenance running between {srv_settings.get('butlerStartHour').value}:00 and {srv_settings.get('butlerEndHour').value}:00")
|
|
|
|
else:
|
|
|
|
|
|
|
|
uc_str = f"Unknown update channel: {chl_num}."
|
|
|
|
|
|
|
|
except NotFound:
|
|
|
|
|
|
|
|
uc_str = f"Unknown update channel."
|
|
|
|
|
|
|
|
logger.info(f"PlexPass: {self.PlexServer.myPlexSubscription} on {uc_str}")
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
|
|
|
logger.info(f"Scheduled maintenance running between {srv_settings.get('butlerStartHour').value}:00 and {srv_settings.get('butlerEndHour').value}:00")
|
|
|
|
|
|
|
|
except NotFound:
|
|
|
|
|
|
|
|
logger.info("Scheduled maintenance times could not be found")
|
|
|
|
except Unauthorized:
|
|
|
|
except Unauthorized:
|
|
|
|
logger.info(f"Plex Error: Plex connection attempt returned 'Unauthorized'")
|
|
|
|
logger.info(f"Plex Error: Plex connection attempt returned 'Unauthorized'")
|
|
|
|
raise Failed("Plex Error: Plex token is invalid")
|
|
|
|
raise Failed("Plex Error: Plex token is invalid")
|
|
|
|