aboutsummaryrefslogtreecommitdiff
path: root/addons/service.xbmc.versioncheck/service.py
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2017-10-30 12:35:33 +0100
committerRechi <Rechi@users.noreply.github.com>2017-10-30 12:35:33 +0100
commit49fb64518333fd15bb96dba0d3870b849e94470c (patch)
treea4fddb88a65672dc6fa0b850d05975bbfdf84783 /addons/service.xbmc.versioncheck/service.py
parent5c9080b0f45bf1da5d327c20117e5cff5a0edfa1 (diff)
[addons] sync versioncheck with repo
Diffstat (limited to 'addons/service.xbmc.versioncheck/service.py')
-rw-r--r--addons/service.xbmc.versioncheck/service.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/addons/service.xbmc.versioncheck/service.py b/addons/service.xbmc.versioncheck/service.py
index 7537ff3faf..7f85bedefe 100644
--- a/addons/service.xbmc.versioncheck/service.py
+++ b/addons/service.xbmc.versioncheck/service.py
@@ -31,11 +31,16 @@ ADDONPATH = lib.common.ADDONPATH
ICON = lib.common.ICON
oldversion = False
+monitor = xbmc.Monitor()
+
class Main:
def __init__(self):
linux = False
packages = []
- xbmc.sleep(5000)
+
+ if monitor.waitForAbort(5):
+ sys.exit(0)
+
if xbmc.getCondVisibility('System.Platform.Linux') and ADDON.getSetting("upgrade_apt") == 'true':
packages = ['kodi']
_versionchecklinux(packages)
@@ -62,9 +67,9 @@ def _versionchecklinux(packages):
handler = False
result = False
try:
- # try aptdeamon first
- from lib.aptdeamonhandler import AptdeamonHandler
- handler = AptdeamonHandler()
+ # try aptdaemon first
+ from lib.aptdaemonhandler import AptdaemonHandler
+ handler = AptdaemonHandler()
except:
# fallback to shell
# since we need the user password, ask to check for new version first
@@ -100,5 +105,8 @@ def _versionchecklinux(packages):
if (__name__ == "__main__"):
- log('Version %s started' % ADDONVERSION)
- Main()
+ if ADDON.getSetting("versioncheck_enable") == "false":
+ log("Disabled")
+ else:
+ log('Version %s started' % ADDONVERSION)
+ Main()