diff options
author | Rechi <Rechi@users.noreply.github.com> | 2019-04-13 19:56:30 +0200 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2019-04-13 19:56:30 +0200 |
commit | 6aee05d2d520fecebee23e873a6cdaaf7fdfc0e1 (patch) | |
tree | 0db39738c6ca74d1616dcf1030b40c472c294179 /addons/service.xbmc.versioncheck | |
parent | 8ba1c674004827c364b4caad89d0ceba1fe7cfe4 (diff) |
[addons] sync with repo
Diffstat (limited to 'addons/service.xbmc.versioncheck')
-rw-r--r-- | addons/service.xbmc.versioncheck/README.md | 4 | ||||
-rw-r--r-- | addons/service.xbmc.versioncheck/addon.xml | 2 | ||||
-rw-r--r-- | addons/service.xbmc.versioncheck/changelog.txt | 2 | ||||
-rw-r--r-- | addons/service.xbmc.versioncheck/lib/common.py | 26 | ||||
-rw-r--r-- | addons/service.xbmc.versioncheck/resources/versions.txt | 45 | ||||
-rw-r--r-- | addons/service.xbmc.versioncheck/service.py | 4 |
6 files changed, 73 insertions, 10 deletions
diff --git a/addons/service.xbmc.versioncheck/README.md b/addons/service.xbmc.versioncheck/README.md index 5f8cbc56e5..fb153e0292 100644 --- a/addons/service.xbmc.versioncheck/README.md +++ b/addons/service.xbmc.versioncheck/README.md @@ -1,6 +1,6 @@ -XBMC Versioncheck +Kodi Version Check service addon ========================= -This service checks the installed XBMC version against the next available one and notifies you if there is a new version available. +This service checks the installed Kodi/XBMC version against the next available one and notifies you if there is a new version available. When a new version comes out the versions.txt should be updated to reflect the latest version available. When updating the version.txt always put latest release at the top since the list is read in chronological order. diff --git a/addons/service.xbmc.versioncheck/addon.xml b/addons/service.xbmc.versioncheck/addon.xml index e30d70bdd2..85f7081bdd 100644 --- a/addons/service.xbmc.versioncheck/addon.xml +++ b/addons/service.xbmc.versioncheck/addon.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addon id="service.xbmc.versioncheck" name="Version Check" - version="0.4.1" + version="0.4.6" provider-name="Team Kodi"> <requires> <import addon="xbmc.python" version="2.1.0"/> diff --git a/addons/service.xbmc.versioncheck/changelog.txt b/addons/service.xbmc.versioncheck/changelog.txt index 89e88d9bed..eefbdcfd43 100644 --- a/addons/service.xbmc.versioncheck/changelog.txt +++ b/addons/service.xbmc.versioncheck/changelog.txt @@ -1,4 +1,4 @@ -v0.3.27 +v0.3.26 to v0.4.5 - Update version list v0.3.25 diff --git a/addons/service.xbmc.versioncheck/lib/common.py b/addons/service.xbmc.versioncheck/lib/common.py index 69e70786d6..e5411c85b9 100644 --- a/addons/service.xbmc.versioncheck/lib/common.py +++ b/addons/service.xbmc.versioncheck/lib/common.py @@ -33,6 +33,7 @@ else: ADDONPATH = ADDON.getAddonInfo('path').decode('utf-8') ADDONPROFILE = xbmc.translatePath( ADDON.getAddonInfo('profile') ).decode('utf-8') ICON = ADDON.getAddonInfo('icon') +KODI_VERSION_MAJOR = int(xbmc.getInfoLabel('System.BuildVersion')[0:2]) monitor = xbmc.Monitor() @@ -173,15 +174,32 @@ def upgrade_message2( version_installed, version_available, version_stable, oldv log("Already notified one time for upgrading.") +def abortRequested(): + if KODI_VERSION_MAJOR > 13: + return monitor.abortRequested() + else: + return xbmc.abortRequested + + +def waitForAbort(seconds): + if KODI_VERSION_MAJOR > 13: + return monitor.waitForAbort(seconds) + else: + for _ in range(0, seconds*1000/200): + if xbmc.abortRequested: + return True + xbmc.sleep(200) + + def wait_for_end_of_video(): # Don't show notify while watching a video - while xbmc.Player().isPlayingVideo() and not monitor.abortRequested(): - if monitor.waitForAbort(1): + while xbmc.Player().isPlayingVideo() and not abortRequested(): + if waitForAbort(1): # Abort was requested while waiting. We should exit break i = 0 - while i < 10 and not monitor.abortRequested(): - if monitor.waitForAbort(1): + while i < 10 and not abortRequested(): + if waitForAbort(1): # Abort was requested while waiting. We should exit break i += 1 diff --git a/addons/service.xbmc.versioncheck/resources/versions.txt b/addons/service.xbmc.versioncheck/resources/versions.txt index 5556b58198..cf38def2e8 100644 --- a/addons/service.xbmc.versioncheck/resources/versions.txt +++ b/addons/service.xbmc.versioncheck/resources/versions.txt @@ -212,6 +212,51 @@ ], "releasecandidate": [ { + "major": "18", + "minor": "0", + "tag": "releasecandidate", + "tagversion":"5", + "revision": "20190111-baff0a1838", + "extrainfo": "RC5", + "addon_support": "yes" + }, + { + "major": "18", + "minor": "0", + "tag": "releasecandidate", + "tagversion":"4", + "revision": "20181228-14086a7bd3", + "extrainfo": "RC4", + "addon_support": "yes" + }, + { + "major": "18", + "minor": "0", + "tag": "releasecandidate", + "tagversion":"3", + "revision": "20181216-e3bd680be6", + "extrainfo": "RC3", + "addon_support": "yes" + }, + { + "major": "18", + "minor": "0", + "tag": "releasecandidate", + "tagversion":"2", + "revision": "20181202-812855d84e", + "extrainfo": "RC2", + "addon_support": "yes" + }, + { + "major": "18", + "minor": "0", + "tag": "releasecandidate", + "tagversion":"1", + "revision": "20181121-314c302559", + "extrainfo": "RC1", + "addon_support": "yes" + }, + { "major": "17", "minor": "0", "tag": "releasecandidate", diff --git a/addons/service.xbmc.versioncheck/service.py b/addons/service.xbmc.versioncheck/service.py index 86bbdd5e53..038589f7a8 100644 --- a/addons/service.xbmc.versioncheck/service.py +++ b/addons/service.xbmc.versioncheck/service.py @@ -21,7 +21,7 @@ import platform import xbmc import xbmcgui import lib.common -from lib.common import log, dialog_yesno, localise +from lib.common import log, dialog_yesno, localise, waitForAbort from lib.common import upgrade_message as _upgrademessage from lib.common import upgrade_message2 as _upgrademessage2 @@ -39,7 +39,7 @@ class Main: linux = False packages = [] - if monitor.waitForAbort(5): + if waitForAbort(5): sys.exit(0) if xbmc.getCondVisibility('System.Platform.Linux') and ADDON.getSetting("upgrade_apt") == 'true': |