Open RNostrand opened 1 month ago
Works for me, with the caveat that it blinks back for a bit before finally settling.
Episode done and marked as watched in Kodi -> Episode syncs from Jellyfin, marking as unwatched -> Watched state gets synced as watched.
I have not yet looked into why this is.
It looks like this is due to using an external player. I am able have the status synced if I manually marked the episode as watched in the UI for Kodi. However, after being played with mpv, it does not sync. This is strange because it does update it as watched in Kodi, before being overwritten by the status from Jellyfin.
I do see the playcount being incremented in the logs, so I guess the question is why is the sync not being triggered with the new status in Kodi as the correct status to update in jellyfin.
I use native playback method j4k, it seems new jellyfin update now doesnt recognise the smb network path specified in the library data options file, its broken native as now it only shows the jellyfin data path, ive looked through the updated files but cant see where theyve changed it, i would imagine these 2 issues are linked as it cant locate the file for watched state on external either as there are a few lines in the utils.py kodi file that now error and cannot sync according to the log,
Ive reverted jellyfin back to the previous version and done a library repair and all is back working.
If anyone can work out what theyve changed to cause this hopefully both issues will be fixed together
New logs: here These are what pop out to me as relevant
debug <general>: CSaveFileState::DoWork - Saving file state for video item plugin://plugin.video.jellyfin/0c41907140d802bb58430fed7e2cd79e/2ba47bd38b16cce086c14fde39ad0e9d/?filename=Blue+Box+%282024%29+-+S01E06+-+006+-+Wish+Me+Luck+%5BNF+WEBDL-1080p%5D%5B8bit%5D%5Bx264%5D%5BEAC3+5.1%5D%5BJA%5D-VARYG.mkv&id=ItemId&dbid=10508&mode=play
debug <general>: CSaveFileState::DoWork - Marking video item plugin://plugin.video.jellyfin/0c41907140d802bb58430fed7e2cd79e/2ba47bd38b16cce086c14fde39ad0e9d/?filename=Blue+Box+%282024%29+-+S01E06+-+006+-+Wish+Me+Luck+%5BNF+WEBDL-1080p%5D%5B8bit%5D%5Bx264%5D%5BEAC3+5.1%5D%5BJA%5D-VARYG.mkv&id=ItemId&dbid=10508&mode=play as watched
info <general>: JELLYFIN.jellyfin_kodi.monitor -> DEBUG::jellyfin_kodi\monitor.py:111 [ xbmc: VideoLibrary.OnUpdate ] {
"item": {
"id": 10508,
"type": "episode"
},
"playcount": 1
}
info <general>: JELLYFIN.jellyfin_kodi.objects.actions -> INFO::jellyfin_kodi\objects\actions.py:819 [ update/1 ] kodi_id: 10508 media: episode
...
info <general>: JELLYFIN.jellyfin_kodi.monitor -> DEBUG::jellyfin_kodi\monitor.py:111 [ xbmc: VideoLibrary.OnUpdate ] {
"id": 10508,
"type": "episode"
}
info <general>: JELLYFIN.jellyfin_kodi.objects.actions -> DEBUG::jellyfin_kodi\objects\actions.py:821 Invalid playstate update
info <general>: JELLYFIN.jellyfin_kodi.player -> INFO::jellyfin_kodi\player.py:406 Played info: {'https://{jellyfin-server}/Videos/ItemId/stream?static=true&MediaSourceId=ItemId&api_key={jellyfin-token}': {'Type': 'Episode', 'Id': 'ItemId', 'Path': 'https://{jellyfin-server}/Videos/ItemId/stream?static=true&MediaSourceId=ItemId&api_key={jellyfin-token}', 'PlayMethod': 'DirectStream', 'PlayOption': 'Addon', 'MediaSourceId': 'ItemId', 'Runtime': 14172800000, 'PlaySessionId': '43c7a712f3924e5481d0246290a5c6a6', 'ServerId': None, 'DeviceId': 'DeviceId', 'SubsMapping': {}, 'AudioStreamIndex': 1, 'SubtitleStreamIndex': 2, 'CurrentPosition': 0, 'CurrentEpisode': ... 'playcount': 0, ...
info <general>: JELLYFIN.jellyfin_kodi.entrypoint.service -> DEBUG::jellyfin_kodi\entrypoint\service.py:208 [ plugin.video.jellyfin: UserDataChanged ] {
"UserDataList": [
{
"IsFavorite": false,
"ItemId": "ItemId",
"Key": "429934001006",
"LastPlayedDate": "2024-11-04T03:17:23.5036758Z",
"PlayCount": 1,
"PlaybackPositionTicks": 0,
"Played": false
},
{
"IsFavorite": false,
"ItemId": "1a6278185fc15f0a50be4b7bf26809e7",
"Key": "429934001",
"PlayCount": 0,
"PlaybackPositionTicks": 0,
"Played": false,
"UnplayedItemCount": 1
}
],
"UserId": "UserId"
}
What I see from this is this flow: Playback finishes -> Kodi marks item as watched -> 2 on_update events, one yields "Invalid playstate update" -> Played Info: has that 'CurrentPosition' and 'playcount' as 0 -> add-on writes to Jellyfin with "PlayCount": 1, "PlaybackPositionTicks": 0, "Played": false. -> Kodi reads from Jellyfin, marks item as unwatched
So kodi is writing to Jellyfin, it is just writing incorrect information; namely "Played" being set to 'false' even though the playCount correctly increments.
I have the same problem.
If it helps isolate the cause, I am using native mode path replacement #926 with Jellyfin 10.10. I also had the problem using the library native paths in Jellyfin 10.9
After installing #938 I continue to have this problem if I leave the Sync Playback mode as "add-on (default)" so I am pretty sure that this mode is the key to the problem.
That is, watch state is not passed from Kodi to Jellyfin when in "add-on" mode after using an external player or after playing a video with native paths defined for that video library.
After installing #938 I continue to have this problem if I leave the Sync Playback mode as "add-on (default)" so I am pretty sure that this mode is the key to the problem.
That is, watch state is not passed from Kodi to Jellyfin when in "add-on" mode after using an external player or after playing a video with native paths defined for that video library.
Am I understanding you correctly in that you configure jf4kodi in add-on mode, and then add the media directly to Kodi with Kodi's own media scanner?
If so, that is very much not a supported setup configuration.
Am I understanding you correctly in that you configure jf4kodi in add-on mode, and then add the media directly to Kodi with Kodi's own media scanner?
If so, that is very much not a supported setup configuration.
You misunderstand. I have installed https://github.com/jellyfin/jellyfin-kodi/pull/938 and though j4kodi is in "add-on" Playback mode, I have set a few video folders using the path replacement of https://github.com/jellyfin/jellyfin-kodi/pull/938. I still use Jellyfin's media metadata in Kodi.
What I am trying to say is that the problems that others and i are experiencing with the watched status seems to be due to playing videos from Jellyfin with external or in my case the Kodi player directly. Please note, that in my as as well, manually setting the watched state in Kodi does update Jellyfin.
I'm getting (and have forever) the same kind of behavior using native mode. It's a bit difficult sometimes to get rid of the in progress marker on a video, doing a reset progress then a mark as watch gets reverted after a few seconds, most of the time.
I've found that playing the episode to the end (skipping to near the end and waiting for it to complete naturally) is more likely to clear it, although not every time so I could be wrong. Often I just go fix it using the jellyfin app, and let that sync down to Kodi
I'm getting (and have forever) the same kind of behavior using native mode. It's a bit difficult sometimes to get rid of the in progress marker on a video, doing a reset progress then a mark as watch gets reverted after a few seconds, most of the time.
I've found that playing the episode to the end (skipping to near the end and waiting for it to complete naturally) is more likely to clear it, although not every time so I could be wrong. Often I just go fix it using the jellyfin app, and let that sync down to Kodi
Your description here matches #538, and is something I also see with addon mode, altho possibly less frequently.
From #606:
I can reproduce this behaviour on all my devices and Kodi installations and it's going on for at least a year now. I hoped, it will get fixed. And it didn't bother me that much, because normally I watch an episode nearly to it's end, so it will be recognized as "watched". But now I have several series, where there are 5 minutes or more of endcredits and I skip them, of course. So every episode stays as "partially watched".
And that's the important point: Basis is a "partially watched" episode or film. When I now use "mark as watched" in Kodi, this doesn't get synced to the Jellyfin server. Same goes for "reset position" (I don't know the exact english label for it), that doesn't reach the server either.
The only thing that works and gets synced is
first "mark as unwatched" then "mark as watched" again. This is my workaround and has been for a long time. But doing this on every episode is kinda annoying...
Describe the bug Watch state is only synced from Jellyfin to Kodi. After watching an episode on Kodi, it gets marked as completed, but moments later will be overwritten by the state on Jellyfin and will be marked as unwatched.
To Reproduce
Expected behavior After watching an episode in Kodi, watch status is synced from Kodi -> Jellyfin. Episode should be marked as watched in both Kodi and Jellyfin.
Logs Logs
Screenshots N/A
System (please complete the following information):
Additional context Aside from this add-on, I only have Arctic Horizon 2 as my skin for Kodi. I am also using mpv as an external player.