verifica directory e test_conn spostati in service

This commit is contained in:
mac12m99
2021-02-28 20:23:57 +01:00
parent 503fe75d26
commit ec8ab9db35
4 changed files with 12 additions and 14 deletions

View File

@@ -448,6 +448,10 @@ class AddonMonitor(xbmc.Monitor):
if __name__ == "__main__":
logger.info('Starting KoD service')
# Test if all the required directories are created
config.verify_directories_created()
if config.get_setting('autostart'):
xbmc.executebuiltin('RunAddon(plugin.video.' + config.PLUGIN_NAME + ')')
@@ -508,6 +512,10 @@ if __name__ == "__main__":
while xbmc.getCondVisibility('Library.IsScanningVideo()'):
xbmc.sleep(1000)
# check if the user has any connection problems
from platformcode.checkhost import test_conn
run_threaded(test_conn, (True, not config.get_setting('resolver_dns'), True, [], [], True))
monitor = AddonMonitor()
# mark as stopped all downloads (if we are here, probably kodi just started)