2025-02-21, 12:57 PM
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
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.
I found a workaround though via the
kodi-send
command (my client is running kodi via CoreELEC):
kodi-send --action="PlayMedia(plugin
/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.