Skip to content

Commit

Permalink
Add: Additional logging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Drazzilb08 committed Feb 25, 2024
1 parent c7c065c commit 01d2a45
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/labelarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def sync_to_plex(plex, data_dict, instance_type):
None
"""

print(f"Syncing labels to Plex")
logger.info(f"Syncing labels to Plex")

# Loop through each item in the data_dict
for item in data_dict:
Expand Down Expand Up @@ -307,7 +307,7 @@ def main():
if plex_instance in config.plex_config:
# Connect to the Plex server
try:
print("Connecting to Plex...")
logger.info("Connecting to Plex...")
plex = PlexServer(config.plex_config[plex_instance]['url'], config.plex_config[plex_instance]['api'], timeout=120)
except BadRequest:
logger.error(f"Error connecting to Plex instance: {plex_instance}")
Expand All @@ -316,7 +316,10 @@ def main():

# Fetch Plex data and process it
if library_names:
library_names_str = ", ".join(library_names)
logger.info(f"Gathering plex data on {server_name} for {library_names_str}... Please wait...")
plex_dict = get_plex_data(plex, library_names, logger, include_smart=False, collections_only=False)
logger.info(f"Completed gathering plex data...")
else:
logger.error(f"No library names provided for {starr_server_name}, against {server_name}. Skipping...")
continue
Expand Down

0 comments on commit 01d2a45

Please sign in to comment.