Open jfly opened 1 month ago
Looks like this is likely due to the function getting called with an empty string for the id, I need more logs, specifically the json blob(s) printed at the debug level (enable in the addon settings, not Kodi settings) just before the logged error. Probably easiest to provide more rather than less logs, so I don't have to request more multiple times :slightly_smiling_face:
https://github.com/jellyfin/jellyfin-kodi/blob/163765872896e2e5d71190dcdfd0c5ee48e828a6/jellyfin_kodi/entrypoint/service.py#L208 https://github.com/jellyfin/jellyfin-kodi/blob/163765872896e2e5d71190dcdfd0c5ee48e828a6/jellyfin_kodi/helper/utils.py#L129
Could be a trailing comma in a list of IDs or some such
Oh dear. I completely misunderstood this "Select the libraries to remove" UI:
I now see that it's a xbmcgui.Dialog.multiselect
, which allows you to just select nothing and press OK
This results in selection
being an empty array here: https://github.com/jellyfin/jellyfin-kodi/blob/163765872896e2e5d71190dcdfd0c5ee48e828a6/jellyfin_kodi/library.py#L595, which zips right past this if selection is None
check, and we end up setting Id
to an empty array here.
So I'm unblocked! I just need to actually select the libraries I want. This simplest way to avoid the crash might be to tweak this if statement to also detect empty arrays. But it might also be nice to put the user in a loop, with a nice dialog telling them to actually select something (or bail out by selecting "Cancel").
Yea, those dialogs have tripped me up a few times too, it's the same functionality for adding libraries IIRC
Describe the bug
The plugin crashes when I try to remove libraries under Addons > Jellyfin > Manage libraries > Remove libraries.
I see the following in my logs:
Additional context
remove_library
takes 3 parameters (self, library_id, dialog). However, it's actually decorated with the@progress
decorator, which adds an optionalitem
argument as the second parameter after self.I think to fix this we'd need to start passing library_id as a keyword argument (right now it's getting consumed as the
item
parameter to the function that@progress
returns). We'd also need to pass indialog
, I'm not sure what that is.