diff --git a/src/functions.py b/src/functions.py index 49312cf..9afec6e 100644 --- a/src/functions.py +++ b/src/functions.py @@ -8,7 +8,7 @@ logfile = os.getenv("LOGFILE", "log.log") def logger(message: str, log_type=0): - debug = str_to_bool(os.getenv("DEBUG", "True")) + debug = str_to_bool(os.getenv("DEBUG", "False")) debug_level = os.getenv("DEBUG_LEVEL", "info").lower() output = str(message) diff --git a/src/jellyfin.py b/src/jellyfin.py index 1b139d5..3d98b86 100644 --- a/src/jellyfin.py +++ b/src/jellyfin.py @@ -105,6 +105,11 @@ class Jellyfin: and movie["MediaSources"] is not {} ): logger(f"Jellyfin: Adding {movie['Name']} to {user_name} watched list", 3) + if "ProviderIds" in movie: + logger(f"Jellyfin: {movie['Name']} {movie['ProviderIds']} {movie['MediaSources']}", 3) + else: + logger(f"Jellyfin: {movie['Name']} {movie['MediaSources']['Path']}", 3) + # Create a dictionary for the movie with its title movie_guids = {"title": movie["Name"]} diff --git a/src/plex.py b/src/plex.py index 919d8a3..1948bcc 100644 --- a/src/plex.py +++ b/src/plex.py @@ -1,4 +1,4 @@ -import re, requests +import re, requests, json from urllib3.poolmanager import PoolManager from plexapi.server import PlexServer @@ -42,6 +42,8 @@ def get_user_library_watched(user, user_plex, library): for video in library_videos.search(unwatched=False): logger(f"Plex: Adding {video.title} to {user_name} watched list", 3) + logger(f"Plex: {video.title} {video.guids} {video.locations}", 3) + movie_guids = {} for guid in video.guids: # Extract source and id from guid.id