Closed seblu closed 1 year ago
Here is a quick workaround.
diff --git a/src/jellyfin.py b/src/jellyfin.py
index f17f445..aa15456 100644
--- a/src/jellyfin.py
+++ b/src/jellyfin.py
@@ -752,7 +752,7 @@ class Jellyfin:
if episode_status["completed"]:
jellyfin_episode_id = jellyfin_episode["Id"]
msg = (
- f"{jellyfin_episode['SeriesName']} {jellyfin_episode['SeasonName']} Episode {jellyfin_episode['IndexNumber']} {jellyfin_episode['Name']}"
+ f"{jellyfin_episode['SeriesName']} {jellyfin_episode['SeasonName']} Episode {jellyfin_episode.get('IndexNumber')} {jellyfin_episode['Name']}"^M
+ f" as watched for {user_name} in {library} for Jellyfin"
)
if not dryrun:
@@ -768,7 +768,7 @@ class Jellyfin:
# TODO add support for partially watched episodes
jellyfin_episode_id = jellyfin_episode["Id"]
msg = (
- f"{jellyfin_episode['SeriesName']} {jellyfin_episode['SeasonName']} Episode {jellyfin_episode['IndexNumber']} {jellyfin_episode['Name']}"
+ f"{jellyfin_episode['SeriesName']} {jellyfin_episode['SeasonName']} Episode {jellyfin_episode.get('IndexNumber')} {jellyfin_episode['Name']}"^M
+ f" as partially watched for {floor(episode_status['time'] / 60_000)} minutes for {user_name} in {library} for Jellyfin"
)
if not dryrun:
Ahh your right i ran into this issue before and is why i removed the episode number at some point. Let me go ahead and add this in, thank you.
I merged both your changes to dev can you test and see if that works for this issue and #76
Yes no more traceback. Thanks!
Sorry, too fast. There is still a traceback.
[ERROR]: Jellyfin: Error updating watched for albert in library Evangil 'IndexNumber'
[ERROR]: Traceback (most recent call last):
File "/home/albert/JellyPlex-Watched/src/jellyfin.py", line 771, in update_user_watched
f"{jellyfin_episode['SeriesName']} {jellyfin_episode['SeasonName']} Episode {jellyfin_episode['IndexNumber']} {jellyfin_episode['Name']}"
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'IndexNumber'
That line doesnt exist in dev anymore so it might be a stale line on your side. Can you try doing a checkout on that file so it resets it to my file and then do a pull again to make sure?
Sorry, I missed you message about dev
branch, I was testing against main
. With dev
branch it's now ok.
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
main
.