Hi mcarlton00,
Thanks for pointing me to the PR, I didn’t find that when I looked. I’ve done some more testing on a test kodi install for the hyphens in user ID issue. Note this is all with Kodi 18.9 and the Jellyfin Kodi Addon 0.65+py2. I get the same behaviour under libreelec (Linux) and an OSX kodi install. (On the same test install I re-verified that I need to remove the leading slash in the check_companion_installed function in order to have sync work at all - that seems consistent for me).
This kodi install was previously connected to a Jellyfin 10.6.4 server, which was updated to 10.7.0 RC1 and is most definitely running the version 6 of the Kodi Sync Queue plugin. I’ve uninstalled/reinstalled and verified in the filesystem and log, have restarted the server etc.
When the server was on 10.6.4, the userdata/addon_data/plugin.video.jellyfin/data.json file looked like this:
{
"Servers": [
{
"AccessToken": "5ed23eecac6c405db678e48233a2b647",
"DateLastAccessed": "2020-12-04T20:31:20Z",
"Id": "acb3a2488459464bb011f722f1dc4e06",
"Name": "jellyfin",
"UserId": "db8c31387290494aa42c3bb1321e6ff6",
"Users": [
{
"Id": "db8c31387290494aa42c3bb1321e6ff6",
"IsSignedInOffline": true
}
],
"address": "http://192.168.xxx.xxx:8096"
}
]
}
After running kodi against the 10.7.0 RC1 server, the same file looked like this:
{
"Servers": [
{
"AccessToken": "6e5bfa242fb14c64a9d1afb1fb8d5302",
"DateLastAccessed": "2020-12-09T10:57:46Z",
"Id": "acb3a2488459464bb011f722f1dc4e06",
"Name": "jellyfin",
"UserId": "db8c3138-7290-494a-a42c-3bb1321e6ff6",
"Users": [
{
"Id": "db8c31387290494aa42c3bb1321e6ff6",
"IsSignedInOffline": true
},
{
"Id": "db8c3138-7290-494a-a42c-3bb1321e6ff6",
"IsSignedInOffline": true
}
],
"address": "http://192.168.xxx.xxx:8096"
}
]
}
Hyphens have appeared. Note the duplicate “Id” in “Users”, one with hyphens and one without. Not sure about that, regardless the issue appears to be with the UserID entry in “Servers”, not the “Id”'s in “Users”.
With kodi not running I now go and mark a movie as watched in the jellyfin web UI. Then restart kodi.
On the server I get the following in the logs with the “UserId”: “db8c3138-7290-494a-a42c-3bb1321e6ff6” in the data.json:
[2020-12-09 11:22:59.083 +11:00] [INF] [83] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Server Time Requested…
[2020-12-09 11:22:59.126 +11:00] [INF] [102] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Sync Requested for UserID: ‘“db8c3138-7290-494a-a42c-3bb1321e6ff6”’ with LastUpdateDT: ‘“2020-12-09T00:02:13z”’
[2020-12-09 11:22:59.129 +11:00] [INF] [102] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Added: 0, Removed: 0, Updated: 0, Changed User Data: 0
[2020-12-09 11:22:59.129 +11:00] [INF] [102] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Request Finished Taking “00:00:00.0026477”
If I stop kodi, hack the json so the “UserID” in “Servers” has no dashes, then start again I get the following in the server log, and the kodi log reflects this, pulling down the changes and reflecting the watched status after starting kodi and logging in.
[2020-12-09 11:32:34.471 +11:00] [INF] [108] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Server Time Requested…
[2020-12-09 11:32:34.524 +11:00] [INF] [58] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Sync Requested for UserID: ‘“db8c31387290494aa42c3bb1321e6ff6”’ with LastUpdateDT: ‘“2020-12-09T00:02:13z”’
[2020-12-09 11:32:34.528 +11:00] [INF] [58] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Added: 0, Removed: 0, Updated: 0, Changed User Data: 1
[2020-12-09 11:32:34.528 +11:00] [INF] [58] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Request Finished Taking “00:00:00.0036946”
So in short, the “UserId” field only seems to work without dashes, the “Users”:“Id” field doesn’t seem to matter either way. Perhaps importantly, I’m not getting an error in the logs when hyphens are used, just no records.
In my kodisyncqueue.db file all the User ID’s seem to be listed without dashes if that matters.
Hopefully this helps pinpoint the issue.
Kikinho I’m sorry I’ve seemed to of hijacked your thread, I originally thought our issues were related but they may not be, but I have experienced what you have on 10.6.4 and it did eventually start working but I’m not sure why or how. I believe multiple reset local databases and re-setup of the plugin may have done it - it might be to do with how you specify the server - manually or auto discovery or something. From what I can tell, the sync option will disable itself on login if that api call for the date and time fails, but there could be other reasons too.
I wish I could help you more but I’m barely scratching the surface myself as I’m very new to jellyfin so largely in the same boat as you - trying to figure it all out. If you can’t get it working it might be worth waiting for 10.7 and updating? - perhaps the changes the team are working on now might mean it works better for you. Also, I’m not convinced profiles in kodi doesn’t cause problems - I’m pretty sure there are bugs and quirks there too which might be having an impact.