script.module.codequick
script.module.codequick copied to clipboard
Catch extra 'reload' argument added by some Kodi skins
Hi Willforde,
I don't know if it's the role of CodeQuick to treat this behavior. Some kodi skins (like Aura) have a "Widget" feature that grab items from a specific add-on menu to shows those items in the kodi home menu.
But it seems that when the user select one of this items, the skin add an extra reload
argument in the Kodi URL.
If the callback function does not plan to receive this extra argument we need to add **kwargs
in the function definition to catch the reload
keyword argument. Instead we get a callback_function() got an unexpected keyword argument 'reload'
.
Do you know what's the purpose of this extra keyword? Do you know if CodeQuick needs to catch this keyword to perform some magic task OR if we need to treat this keyword directly in our add-on?
You can see the error in this log: https://paste.kodi.tv/uzanerapur
Thank you for your help 😃
I did not know that. I wonder is that something that Kodi is adding, or the widget is adding.
I know that Kodi adds 'content_type' to the root callback if your addon has multiple provides in addon.xml.
I can probably change it so it's not strict and will inspect the callback function arguments before calling it, and only pass in the arguments that it has declared. And the full set of parms can still be access by using self.params.
I can also add an option where you can force it to be strict if you need it to be.