2016-02-10, 20:46
(2016-02-10, 20:30)marcelveldt Wrote: Great idea... but...
Python scripts are actually not supposed to write to skin xml files.
Skin shortcuts is the one big exception addon that may do this while still beiing in the official Kodi repo.
I'm open to this suggestion to have one more "generated" include XML file in which skinhelper may write includes but only if ronie agrees with it.
That said. I'm not sure this will actually work because you'll need a reloadskin if the xml is updated dynamically by the script.
Or maybe, just maybe it will work with the new conditional include for files that was added in Isengard or Jarvis.
Maybe just test by adding a condition file include in one your windows (not in the generic includes.xml), update the file, not reload the skin and see what happens ?
I knew you'd tell me about skinshortcuts exception so what I didn't try is to call a file outside the skin's folder (meaning giving it a path), so using your addon_datas folder ?
Regarding the reloadskin, I don't think it's really an issue. IMO this has to be used in skinsettings.xml or custom windows, so applying a reloadskin at onunload is pretty easy. I can test the include trick and let you know.
EDIT : Just thought that the xml file could be written at script installation but remain empty of constants (only <includes> tags). That could avoid having to check if it's there or not.