Jellyfin Forum
Kodi - how to update all jellyfin libraries without prompting - 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: Kodi - how to update all jellyfin libraries without prompting (/t-kodi-how-to-update-all-jellyfin-libraries-without-prompting)



Kodi - how to update all jellyfin libraries without prompting - ancionio - 2025-02-18

Hi, with the jellyfin for kodi addon, is there a command to update the library without prompting the user which libraries to update?

I know I can do PlayMedia(pluginConfused-face/plugin.video.jellyfin/?mode=updatelibs), which is what the "Update Libraries" button does in the jf4kodi addon, but it then opens a prompts to select which libraries should be updated. 
Is there a way to tweak this command to preselect all libraries?

I'm asking because I'd like to schedule this action with cron


RE: Kodi - how to update all jellyfin libraries without prompting - TheDreadPirate - 2025-02-18

I'm not that familiar with Kodi. Does this trigger Jellyfin to scan for new content?

If your goal is to have Jellyfin scan more frequently, you can go to the Jellyfin Dashboard and increase the frequency that the scheduled tasks for library scans runs.

Dashboard > Scheduled Tasks > click on Scan Media Library.

You can change the interval here.


RE: Kodi - how to update all jellyfin libraries without prompting - ancionio - 2025-02-21

From what I understand no it does not trigger a jellyfin rescan server-side but rather a rescan client-side, essentially rebuilding the internal kodi database.

I found a workaround though via the kodi-send command (my client is running kodi via CoreELEC):


kodi-send --action="PlayMedia(pluginConfused-face/plugin.video.jellyfin/?mode=updatelibs)"

sleep 10

kodi-send --button="Enter" # checks the "all" library selection
sleep 1
kodi-send --button="Right" # goes to the "OK" button
sleep 1
kodi-send --button="Enter" # triggers the "OK" action button


btw, here's why I want to schedule a rebuild of the kodi library: 

I have the "Jellyfin for Kodi" addon in native mode, where kodi gets the video files directly via nfs from the source. I much prefer this mode because I have found kodi to be much more responsive (both in the menus and while playing/seeking a video), and generally Kodi just acts better this way. 
However, there are some quirks with the Jellyfin for Kodi addon in native mode, one of them being that it cannot handle multiple versions of merged movies/episodes, it will only add to the Kodi library whichever version that was first added to the Jellyfin library (https://github.com/jellyfin/jellyfin-kodi/issues/312). 

That's alright for my usecase though because the only situation in which I have multiple versions of the same file is when I have a 1080p and a UHD version, and I only need the UHD version to show up in Kodi*. But if Kodi "sees" the second version of a video before the jellyfin server could merge the two together (which, in my situation, is always how it happens), it's gonna add the second version as an individual item in the Kodi library, and the two items in Kodi are left untouched even when the scheduled merge task happens server-side. The only way to keep the video with merged versions as 1 singular item in kodi is to trigger a rescan of the kodi library after the merge task happened server-side. 
Hence why scheduling it is ideal.

* Of course the situation I'm describing here is when I still want the video to be available in two versions on other clients, otherwise I wouldn't bother with all of this and just keep only 1 version. Kodi only ever needs the best though because it is the client I use at home on my TV.