Would IceTV consider adding a feature that allows IceBox users to customise the format their own EPG content?
The IceTV Kodi addon is written in the Python programming language. It should be possible to call an external Python module from within the existing addon.
In its default configuration, the existing Kodi addon would remain relatively unchanged. However, at startup, it would look for a user-defined Python module and set some flags if that module is found and is valid.
In the 'output_xmltv()' function, if the flags are true, service.icetv would then call those pre-defined external functions after the XMLTV object has been created, but before that object is converted to XML and sent to TVH.
This will allow the user to intercept and modify the XMLTV data before it is sent to TVH.
Because some data is critical, such as start/end times, these fields should not be customisable.
I suggest 3 functions in the external module for formatting 3 XMLTV elements: 'title', 'sub-title' and 'desc'. Each of these modules would accept a single 'show' object as input and return a string containing the user-defined content for that field.
Once the module is initially loaded, each of the 3 functions can be tested for individually and flags set accordingly.
There would also need to be some try-except-else protection against syntax errors and the like within the user-defined module.
The existing Kodi addon would remain read-only in '/usr/share/kodi/addons/service.icetv'. However, the external module would be located in '/storage/.kodi/userdata/addon_data/service.icetv/epg_formatter.py' (or similar) where it can be modified by the user.
I can post some code samples if this is of interest.
The IceTV Kodi addon is written in the Python programming language. It should be possible to call an external Python module from within the existing addon.
In its default configuration, the existing Kodi addon would remain relatively unchanged. However, at startup, it would look for a user-defined Python module and set some flags if that module is found and is valid.
In the 'output_xmltv()' function, if the flags are true, service.icetv would then call those pre-defined external functions after the XMLTV object has been created, but before that object is converted to XML and sent to TVH.
This will allow the user to intercept and modify the XMLTV data before it is sent to TVH.
Because some data is critical, such as start/end times, these fields should not be customisable.
I suggest 3 functions in the external module for formatting 3 XMLTV elements: 'title', 'sub-title' and 'desc'. Each of these modules would accept a single 'show' object as input and return a string containing the user-defined content for that field.
Once the module is initially loaded, each of the 3 functions can be tested for individually and flags set accordingly.
There would also need to be some try-except-else protection against syntax errors and the like within the user-defined module.
The existing Kodi addon would remain read-only in '/usr/share/kodi/addons/service.icetv'. However, the external module would be located in '/storage/.kodi/userdata/addon_data/service.icetv/epg_formatter.py' (or similar) where it can be modified by the user.
I can post some code samples if this is of interest.