Jellyfin Forum
run kodi database update via json api - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: run kodi database update via json api (/t-run-kodi-database-update-via-json-api)

Pages: 1 2


run kodi database update via json api - Slomo - 2024-02-07

Hello, does anybody knows if it is possible to trigger a database update of the kodi app via the kodi json api? Reason is that, the automatic updated triggert via the jellyfin server does not work reliable at all for me, so my thought was to trigger a update manually (through the json api) as a workaround. I have two TVs with two raspberry pis running kodi with the jellyfin addon. My idea is to trigger the update on the other pi via the json api when i turn one tv off, so that i can continue watching on the other at the correct position.


RE: run kodi database update via json api - tmsrxzar - 2024-02-07

you shouldn't have to do all that, enable kodi sync plugin on server and in addon

mine are always live with each other within a few seconds


RE: run kodi database update via json api - Slomo - 2024-02-09

yes i shoudn't but unfortunately it does not work reliable, somtimes it does but only like 50% of the time, somtimes there is no database update for multiple days, even though new content was added to the jellyfin library. Therefore i was hoping to find a workaround.
What do you mean by kodi sync plugin? the Kodi sync queue? this one is installed, but the pis are on 24/7 so as i understood it, this shouldn't even be necessary.


RE: run kodi database update via json api - tmsrxzar - 2024-02-09

(2024-02-09, 12:34 PM)Slomo Wrote: What do you mean by kodi sync plugin? the Kodi sync queue? this one is installed, but the pis are on 24/7 so as i understood it, this shouldn't even be necessary.

yes that one
yes it is necessary otherwise it will only update on Kodi startup (or on random events), which i'm guessing is the issue you are seeing


RE: run kodi database update via json api - Slomo - 2024-02-09

ok, but i have it enabled and it still doesn't work reliable for me.


RE: run kodi database update via json api - tmsrxzar - 2024-02-09

this hasn't been an issue for me ever and i've been a kodi+jellyfin user for over 2 years, i also don't use raspberry pi so maybe there's a difference there

maybe @mcarlton00 will have more insight


RE: run kodi database update via json api - Slomo - 2024-02-09

its been an issue for me since i started using jellyfin in combination with kodi for over a year now, had many issuse, also payback was problematic, now i switched to the native playback over smb which works, but the "addon" playback wasn't reliable either. I really like jellyfin but it doesn't run very well for me, but thats onother problem, one at a time. I am thinking of moving back to only using smb for the kodi library.


RE: run kodi database update via json api - tmsrxzar - 2024-02-09

(2024-02-09, 04:49 PM)Slomo Wrote: its been an issue for me since i started using jellyfin in combination with kodi for over a year now, had many issuse, also payback was problematic, now i switched to the native playback over smb which works, but the "addon" playback wasn't reliable either. I really like jellyfin but it doesn't run very well for me, but thats onother problem, one at a time. I am thinking of moving back to only using smb for the kodi library.

all of those playback issues are a result of using raspberry pi, even a generic android device with a S905X4 will out perform a pi
i have no issues with jellyfin+android kodi,coreelec,libreelec up to 4K BluRay Remux with peaks to 100Mbit video and using addon playback
native is more of a hack workaround and i've never used it


RE: run kodi database update via json api - Slomo - 2024-02-09

i am running jellyfin in a docker container with a reverse proxy and lets encrypt, i tried connecting via the external url to it and via the local ip adresse, but the problem exist in both cases, if this info is relevant. I use the linuxserver/jellyfin image (can't remember why i choose this one), maybe i could try the offical image, can't remember if i ever tried it.

when accessing the files over smb i have no issues playing even large 4K files with the raspberry


RE: run kodi database update via json api - mcarlton00 - 2024-02-09

So TLDR: New media/updated status is added to Kodi in one of two ways.
  • New content added to server/updated when Kodi is not running: When Kodi starts, it reaches out to the plugin and says "give me all updated content from $DATE" which is the last time it checked in with the server. Any new content, watched status updates, etc will be synced at this time. This requires the Kodi Sync Queue plugin to be installed in the server.
  • New content added to server/updated when Kodi is running: The server pushes out notifications and Kodi will process and add it to it's local library immediately. This happens over a websocket connection and shouldn't involve any other extra steps or requests.

If you're not getting updates while your client devices are running, that means your websocket connection has failed.  And unfortunately, there's not a whole lot to be done about that.  It's a result of having a network interruption somewhere (router/switch blip, server restarting, Pi hardware being less than great, etc).  Could be any of half a dozen reasons why your connection has failed, all getting singled down to network instability of some kind.  The addon has some code to attempt to reconnect the websocket when it fails, but it seems to be hit or miss if it works or not.  There's a PR out there trying to improve it, but it hasn't been merged yet and it seems to have various success rates based on other commenters.  Issue is here: https://github.com/jellyfin/jellyfin-kodi/issues/797.  PR is linked, and you can make the code changes yourself on your client and see if that improves things.

However, if addon mode is failing to playback, that kinda indicates you have something else screwy going on, possibly the network issues mentioned above.  Native mode is wholly unnecessary in 99% of use cases and is kinda a relic of an old emby bug that was fixed years ago.  The only time native mode makes sense is if your server/network is a literal potato and simply can't handle any amount of reasonable bandwidth, or if your storage is local but your server is remote on a VPS somewhere.