Closed seblu closed 1 year ago
The traceback happen when the video variable has no tmdb
key defined.
Here is a print of the video variable when it's happening
{'title': 'MyTitle', 'locations': ('MyTitle.avi',), 'status': {'completed': True, 'time': 0}}
I used "Fix Match" in Plex to update the video metadata, but it added only an imdb
id.
{'imdb': 'tt13122460', 'title': 'MyTitle', 'locations': ('MyTitle.avi',), 'status': {'completed': True, 'time': 0}}
The errors happen for both series and movies. I had workaround the tracebacks with:
diff --git a/src/jellyfin.py b/src/jellyfin.py
index f17f445..8986e29 100644
--- a/src/jellyfin.py
+++ b/src/jellyfin.py
@@ -584,7 +584,7 @@ class Jellyfin:
for video in videos:
if (
movie_provider_id.lower()
- in video[movie_provider_source.lower()]
+ in video.get(movie_provider_source.lower(), [])^M
):
movie_status = video["status"]
break
@@ -673,7 +673,7 @@ class Jellyfin:
show = {k: v for k, v in show}
if (
show_provider_id.lower()
- in show[show_provider_source.lower()]
+ in show.get(show_provider_source.lower(), [])^M
):
for season in seasons.values():
for episode in season:
No more traceback so far. Thanks!
Describe the bug Traceback when syncing a Plex server to a Jellyfin server.
To Reproduce Steps to reproduce the behavior:
Expected behavior No traceback
Logs
Type:
Additional context
I'm able to reproduce against
5.0.0
,4.5.0
andmain
.