aboutsummaryrefslogtreecommitdiff
path: root/addons/service.xbmc.versioncheck
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2018-11-16 10:20:22 +0100
committerRechi <Rechi@users.noreply.github.com>2018-11-16 10:20:22 +0100
commitdf430fb93e92652176688eecf4eb1cc4bc23df7f (patch)
tree271d8feb38e6a4271665a0e665a488856f6c4c3b /addons/service.xbmc.versioncheck
parentd99f45cd825ec04d1c9fbabcf953e770ad77a4ed (diff)
[addons] sync with repo
Diffstat (limited to 'addons/service.xbmc.versioncheck')
-rw-r--r--addons/service.xbmc.versioncheck/addon.xml2
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/English/strings.po14
-rw-r--r--addons/service.xbmc.versioncheck/resources/versions.txt16
-rw-r--r--addons/service.xbmc.versioncheck/service.py23
4 files changed, 52 insertions, 3 deletions
diff --git a/addons/service.xbmc.versioncheck/addon.xml b/addons/service.xbmc.versioncheck/addon.xml
index 1184bd71c5..e30d70bdd2 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.3.27"
+ version="0.4.1"
provider-name="Team Kodi">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
diff --git a/addons/service.xbmc.versioncheck/resources/language/English/strings.po b/addons/service.xbmc.versioncheck/resources/language/English/strings.po
index c8710afdd6..6746418c5c 100644
--- a/addons/service.xbmc.versioncheck/resources/language/English/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/English/strings.po
@@ -111,3 +111,17 @@ msgstr ""
msgctxt "#32035"
msgid "It is recommended that you to upgrade to a newer version."
msgstr ""
+
+#empty strings from id 32036 to 32039
+
+msgctxt "#32040"
+msgid "Your version %s of the Python cryptography module is too old. You need at least version 1.7."
+msgstr ""
+
+msgctxt "#32041"
+msgid "Please upgrade your operating system."
+msgstr ""
+
+msgctxt "#32042"
+msgid "For more information, see https://kodi.wiki/view/Linux"
+msgstr ""
diff --git a/addons/service.xbmc.versioncheck/resources/versions.txt b/addons/service.xbmc.versioncheck/resources/versions.txt
index 6dea1f5242..5556b58198 100644
--- a/addons/service.xbmc.versioncheck/resources/versions.txt
+++ b/addons/service.xbmc.versioncheck/resources/versions.txt
@@ -397,6 +397,22 @@
"major": "18",
"minor": "0",
"tag": "beta",
+ "tagversion":"5",
+ "revision": "20181103-920e823249",
+ "addon_support": "yes"
+ },
+ {
+ "major": "18",
+ "minor": "0",
+ "tag": "beta",
+ "tagversion":"4",
+ "revision": "20181023-c77874c5bf",
+ "addon_support": "yes"
+ },
+ {
+ "major": "18",
+ "minor": "0",
+ "tag": "beta",
"tagversion":"3",
"revision": "20181002-c2e1b316f5",
"addon_support": "yes"
diff --git a/addons/service.xbmc.versioncheck/service.py b/addons/service.xbmc.versioncheck/service.py
index 7f85bedefe..86bbdd5e53 100644
--- a/addons/service.xbmc.versioncheck/service.py
+++ b/addons/service.xbmc.versioncheck/service.py
@@ -19,8 +19,9 @@
import platform
import xbmc
+import xbmcgui
import lib.common
-from lib.common import log, dialog_yesno
+from lib.common import log, dialog_yesno, localise
from lib.common import upgrade_message as _upgrademessage
from lib.common import upgrade_message2 as _upgrademessage2
@@ -102,9 +103,27 @@ def _versionchecklinux(packages):
log("Unsupported platform %s" %platform.dist()[0])
sys.exit(0)
-
+# Python cryptography < 1.7 (still shipped with Ubuntu 16.04) has issues with
+# pyOpenSSL integration, leading to all sorts of weird bugs - check here to save
+# on some troubleshooting. This check may be removed in the future (when switching
+# to Python3?)
+# See https://github.com/pyca/pyopenssl/issues/542
+def _checkcryptography():
+ ver = None
+ try:
+ import cryptography
+ ver = cryptography.__version__
+ except:
+ # If the module is not found - no problem
+ return
+
+ ver_parts = list(map(int, ver.split('.')))
+ if len(ver_parts) < 2 or ver_parts[0] < 1 or (ver_parts[0] == 1 and ver_parts[1] < 7):
+ log('Python cryptography module version %s is too old, at least version 1.7 needed' % ver)
+ xbmcgui.Dialog().ok(ADDONNAME, localise(32040) % ver, localise(32041), localise(32042))
if (__name__ == "__main__"):
+ _checkcryptography()
if ADDON.getSetting("versioncheck_enable") == "false":
log("Disabled")
else: