I maintain a Kodi add-on (Retrospect) that consists of a main Video add-on and a number of related Video add-ons that contain various parsers for (legal) online video streamers, which I ussuall call channel add-ons. For the end-user it all appears as a single Video add-on, and the fact that there actually are multiple add-on is mainly to support updating these channel add-ons independently.
Some of these channel add-ons required some settings to be configurable. Currently I managed to do this:
- Each channel add-on has a file with Kodi settings.
- Whenever a channel add-on has been updated, the main video add-on merges all the separate setting files from the channel add-ons with the main video add-on settings.
- So now the user can actually access all settings, regardless of to what channel they belong, from a single settings screen.
However there is a catch! Because I merge the settings.xml while running the add-on, Kodi very now and then can’t access the settings.xml file (concurrency and so). This causes Kodi to think there are no settings for the add-on and deletes the user settings.xml and thus all settings. Not so nice. So I am looking for a creative solution for this, one that is more Kodi-like.
I was thinking of the following scenario: Let each channel add-on have it’s own settings.xml. From the main video add-on settings create a list of channel add-ons which run Addon.OpenSettings(id) to open the actual channel settings. This seems OK, however, all settings are multi lingual, so that would require me to have a lot of duplicate translation files. And those translation files are currently larger than the complete set of files in a channel add-on. This is not very ideal. Is there an way of sharing the translation files?
Or does anybody have other suggestions.