diff --git a/resources/lib/modules/iptvsimple.py b/resources/lib/modules/iptvsimple.py index 23cf481..26adafc 100644 --- a/resources/lib/modules/iptvsimple.py +++ b/resources/lib/modules/iptvsimple.py @@ -12,6 +12,8 @@ from resources.lib import kodiutils +import xbmcvfs, glob, shutil + _LOGGER = logging.getLogger(__name__) IPTV_SIMPLE_ID = 'pvr.iptvsimple' @@ -65,6 +67,14 @@ def setup(cls): # Activate IPTV Simple cls._activate() + # If iptv simple uses another name than settings.cml for the configuration file then copy the generated settings.xml to that other name + path = xbmcvfs.translatePath(addon.getAddonInfo('profile')) + settingsxml = path + 'settings.xml' + if os.path.isfile(settingsxml): + for f in glob.glob(path + "*.xml"): + if os.path.basename(f) != 'settings.xml': + shutil.copyfile(settingsxml, f) + return True @classmethod