Add more debug logging. Do not enable debug by default
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"]}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user