From b3736143bc37ec5e2ca365d3838d2a1b8cefd124 Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 19 Aug 2020 09:58:14 +0200 Subject: [PATCH] fix resolverdns kodi 18, filmontv kodi 19 --- platformcode/config.py | 1 + specials/filmontv.py | 3 ++- specials/resolverdns.py | 1 + specials/videolibrary.py | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/platformcode/config.py b/platformcode/config.py index 134d585e..47a8b9e1 100644 --- a/platformcode/config.py +++ b/platformcode/config.py @@ -134,6 +134,7 @@ def get_system_platform(): platform = "osx" return platform + def is_autorun_enabled(): try: if "xbmc.executebuiltin('RunAddon(plugin.video.kod)')" in open(os.path.join(xbmc.translatePath('special://userdata'),'autoexec.py')).read(): diff --git a/specials/filmontv.py b/specials/filmontv.py index 78f2552f..c9973ed0 100644 --- a/specials/filmontv.py +++ b/specials/filmontv.py @@ -39,7 +39,8 @@ def getEpg(): downloadtools.downloadfile(host, archiveName) support.log('opening gzip and writing xml') with gzip.GzipFile(fileobj=filetools.file_open(archiveName, mode='rb', vfs=False)) as f: - guide = f.read().replace('\n', ' ').replace('><', '>\n<') + guide = f.read().decode('utf-8') + guide = guide.replace('\n', ' ').replace('><', '>\n<') with open(xmlName, 'w') as f: f.write(guide) # else: diff --git a/specials/resolverdns.py b/specials/resolverdns.py index 0d55662d..73c9dceb 100644 --- a/specials/resolverdns.py +++ b/specials/resolverdns.py @@ -7,6 +7,7 @@ if PY3: import _ssl DEFAULT_CIPHERS = _ssl._DEFAULT_CIPHERS else: + import urlparse DEFAULT_CIPHERS = ssl._DEFAULT_CIPHERS from lib.requests_toolbelt.adapters import host_header_ssl diff --git a/specials/videolibrary.py b/specials/videolibrary.py index 810f8ffc..d2758cbf 100644 --- a/specials/videolibrary.py +++ b/specials/videolibrary.py @@ -28,7 +28,7 @@ def mainlist(item): Item(channel=item.channel, action="list_tvshows",title=config.get_localized_string(60600), category=config.get_localized_string(70271), thumbnail=thumb("videolibrary_tvshow"), context=[{"channel":"videolibrary", "action":"update_videolibrary", "title":config.get_localized_string(70269)}]), - Item(channel='shortcuts', action="SettingOnPosition", category=2, setting=1, thumbnail = thumb("setting_0"))] + Item(channel='shortcuts', action="SettingOnPosition", title=config.get_localized_string(60542), category=2, setting=1, thumbnail = thumb("setting_0"))] return itemlist