mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
Add a little library info
This commit is contained in:
parent
f4c4b4a880
commit
361d9ee150
1 changed files with 9 additions and 4 deletions
|
@ -443,10 +443,7 @@ class Plex(Library):
|
|||
os.environ["PLEXAPI_PLEXAPI_TIMEOUT"] = str(self.timeout)
|
||||
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}")
|
||||
myAcct = self.PlexServer.myPlexAccount()
|
||||
pp_str = "No PlexPass"
|
||||
if 'plexpass' in myAcct.roles:
|
||||
pp_str = f"PlexPass is active"
|
||||
pp_str = f"PlexPass: {self.PlexServer.myPlexSubscription}"
|
||||
srv_settings = self.PlexServer.settings
|
||||
uc_str = f"Unknown update channel."
|
||||
if srv_settings.get("butlerUpdateChannel").value == '16':
|
||||
|
@ -454,6 +451,7 @@ class Plex(Library):
|
|||
elif srv_settings.get("butlerUpdateChannel").value == '8':
|
||||
uc_str = f"PlexPass update channel."
|
||||
logger.info(f"{pp_str} on {uc_str}")
|
||||
logger.info(f"Scheduled maintenance running between {srv_settings.get('butlerStartHour').value}:00 and {srv_settings.get('butlerEndHour').value}:00")
|
||||
except Unauthorized:
|
||||
logger.info(f"Plex Error: Plex connection attempt returned 'Unauthorized'")
|
||||
raise Failed("Plex Error: Plex token is invalid")
|
||||
|
@ -484,6 +482,10 @@ class Plex(Library):
|
|||
self._all_items = []
|
||||
self._account = None
|
||||
self.agent = self.Plex.agent
|
||||
self.scanner = self.Plex.scanner
|
||||
for stg in self.Plex.settings():
|
||||
if stg.id == 'ratingsSource':
|
||||
self.ratings_source = stg.value
|
||||
self.is_movie = self.type == "Movie"
|
||||
self.is_show = self.type == "Show"
|
||||
self.is_music = self.type == "Artist"
|
||||
|
@ -493,6 +495,9 @@ class Plex(Library):
|
|||
if not self.is_music and self.update_blank_track_titles:
|
||||
self.update_blank_track_titles = False
|
||||
logger.error(f"update_blank_track_titles library operation only works with music libraries")
|
||||
logger.info(f"Connected to library {params['name']}")
|
||||
logger.info(f"Agent: {self.agent}; Scanner: {self.scanner}; ratings source: {self.ratings_source}")
|
||||
exit()
|
||||
|
||||
def notify(self, text, collection=None, critical=True):
|
||||
self.config.notify(text, server=self.PlexServer.friendlyName, library=self.name, collection=collection, critical=critical)
|
||||
|
|
Loading…
Reference in a new issue