workaround corruzzione settings.xml

This commit is contained in:
marco
2020-11-08 11:35:14 +01:00
parent bd321ec073
commit 911ec9a3bf
2 changed files with 16 additions and 3 deletions

View File

@@ -326,6 +326,9 @@ class AddonMonitor(xbmc.Monitor):
def onSettingsChanged(self):
logger.debug('settings changed')
settings_post = config.get_all_settings_addon()
if settings_post: # backup settings
filetools.copy(os.path.join(config.get_data_path(), "settings.xml"),
os.path.join(config.get_data_path(), "settings.bak"), True)
from platformcode import xbmc_videolibrary
if self.settings_pre.get('downloadpath', None) != settings_post.get('downloadpath', None):