From cc7d427de8e5dde9a89c95071cfc3cad6c72c5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Jalette?= Date: Sat, 29 Jan 2022 15:42:53 -0500 Subject: [PATCH 01/10] setup web-pdb --- addon.xml | 1 + default.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 449d028..b8ff960 100644 --- a/addon.xml +++ b/addon.xml @@ -8,6 +8,7 @@ + video diff --git a/default.py b/default.py index 41683a1..9ef6bad 100644 --- a/default.py +++ b/default.py @@ -2,7 +2,7 @@ # version 3.2.2 - By dualB -import os, sys, traceback, xbmcplugin, xbmcaddon, xbmc, simplejson, xbmcgui +import os, sys, traceback, xbmcplugin, xbmcaddon, xbmc, simplejson, xbmcgui, web_pdb from resources.lib.log import log from resources.lib import content, navig @@ -16,6 +16,8 @@ ADDON = xbmcaddon.Addon() +web_pdb.set_trace() + def get_params(): """ function docstring """ param = [] From 9bbc2f3940962631f59ba0122afca79645d8b38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Jalette?= Date: Thu, 3 Feb 2022 22:32:26 -0500 Subject: [PATCH 02/10] print function in python3 --- resources/lib/clearcache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/clearcache.py b/resources/lib/clearcache.py index 1faeffb..9c1641f 100644 --- a/resources/lib/clearcache.py +++ b/resources/lib/clearcache.py @@ -12,7 +12,7 @@ addon_cache_basedir = os.path.join(xbmc.translatePath(addon.getAddonInfo('path')).decode('utf-8'),".cache") if sys.argv[1].lower() == "full": - print "["+addon.getAddonInfo('name')+"] deleting full cache" + print("["+addon.getAddonInfo('name')+"] deleting full cache") for root, dirs, files in os.walk(addon_cache_basedir): for file in files: xbmcvfs.delete(os.path.join(root,file)) From 172efbee8cf4ea2753a53cb6ca6893836fdecaa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Jalette?= Date: Thu, 3 Feb 2022 22:46:05 -0500 Subject: [PATCH 03/10] replace deprecated xbmc.translatePath with xbmcvfs --- default.py | 6 +++--- resources/lib/cache.py | 4 ++-- resources/lib/clearcache.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/default.py b/default.py index 9ef6bad..b895fb7 100644 --- a/default.py +++ b/default.py @@ -2,7 +2,7 @@ # version 3.2.2 - By dualB -import os, sys, traceback, xbmcplugin, xbmcaddon, xbmc, simplejson, xbmcgui, web_pdb +import os, sys, traceback, xbmcplugin, xbmcaddon, xbmc, simplejson, xbmcgui, web_pdb, xbmcvfs from resources.lib.log import log from resources.lib import content, navig @@ -16,7 +16,7 @@ ADDON = xbmcaddon.Addon() -web_pdb.set_trace() + def get_params(): """ function docstring """ @@ -95,7 +95,7 @@ def set_sorting_methods(mode): xbmcplugin.endOfDirectory(int(sys.argv[1])) if MODE != 4 and xbmcaddon.Addon().getSetting('DeleteTempFiFilesEnabled') == 'true': - PATH = xbmc.translatePath('special://temp').decode('utf-8') + PATH = xbmcvfs.translatePath('special://temp').decode('utf-8') FILENAMES = next(os.walk(PATH))[2] for i in FILENAMES: if ".fi" in i: diff --git a/resources/lib/cache.py b/resources/lib/cache.py index e7f21c9..e7f2300 100644 --- a/resources/lib/cache.py +++ b/resources/lib/cache.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # version 3.2.2 - By dualB -import xbmcaddon, os, xbmc, time, sys +import xbmcaddon, os, xbmc, time, sys, xbmcvfs from . import log, html ADDON = xbmcaddon.Addon() -ADDON_CACHE_BASEDIR = os.path.join(xbmc.translatePath(ADDON.getAddonInfo('path')), ".cache") +ADDON_CACHE_BASEDIR = os.path.join(xbmcvfs.translatePath(ADDON.getAddonInfo('path')), ".cache") ADDON_CACHE_TTL = float(ADDON.getSetting('CacheTTL').replace("0", ".5").replace("73", "0")) if not os.path.exists(ADDON_CACHE_BASEDIR): diff --git a/resources/lib/clearcache.py b/resources/lib/clearcache.py index 9c1641f..ca89643 100644 --- a/resources/lib/clearcache.py +++ b/resources/lib/clearcache.py @@ -9,7 +9,7 @@ from xbmcaddon import Addon addon = Addon('plugin.video.telequebec') -addon_cache_basedir = os.path.join(xbmc.translatePath(addon.getAddonInfo('path')).decode('utf-8'),".cache") +addon_cache_basedir = os.path.join(xbmcvfs.translatePath(addon.getAddonInfo('path')).decode('utf-8'),".cache") if sys.argv[1].lower() == "full": print("["+addon.getAddonInfo('name')+"] deleting full cache") From d0689fd763aff33fe1c65b11482ef7f9693d65d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Jalette?= Date: Fri, 4 Feb 2022 00:25:11 -0500 Subject: [PATCH 04/10] use kodi_six + fix populaires json call --- addon.xml | 3 ++- default.py | 3 ++- resources/lib/cache.py | 7 +++++-- resources/lib/clearcache.py | 5 +---- resources/lib/content.py | 16 +++++++++++----- resources/lib/html.py | 3 ++- resources/lib/log.py | 2 +- resources/lib/navig.py | 11 +++++++---- 8 files changed, 31 insertions(+), 19 deletions(-) diff --git a/addon.xml b/addon.xml index b8ff960..ed5b4cc 100644 --- a/addon.xml +++ b/addon.xml @@ -6,7 +6,8 @@ - + + diff --git a/default.py b/default.py index b895fb7..f8eaac7 100644 --- a/default.py +++ b/default.py @@ -2,7 +2,8 @@ # version 3.2.2 - By dualB -import os, sys, traceback, xbmcplugin, xbmcaddon, xbmc, simplejson, xbmcgui, web_pdb, xbmcvfs +import os, sys, traceback, simplejson, web_pdb +from kodi_six import xbmcaddon, xbmcplugin, xbmcvfs, xbmc from resources.lib.log import log from resources.lib import content, navig diff --git a/resources/lib/cache.py b/resources/lib/cache.py index e7f2300..6a17f49 100644 --- a/resources/lib/cache.py +++ b/resources/lib/cache.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # version 3.2.2 - By dualB -import xbmcaddon, os, xbmc, time, sys, xbmcvfs +import os, time, sys, io +from kodi_six import xbmcaddon, xbmcvfs, xbmc from . import log, html ADDON = xbmcaddon.Addon() @@ -27,6 +28,7 @@ def is_cached_content_expired(last_update): def get_cached_content(path,verified=True,headers=[]): """ function docstring """ content = None + try: filename = get_cached_filename(path) if os.path.exists(filename) and not is_cached_content_expired(os.path.getmtime(filename)): @@ -51,5 +53,6 @@ def get_cached_content(path,verified=True,headers=[]): def get_cached_filename(path): """ function docstring """ - filename = "%s" % _hash(repr(path)).hexdigest() + utfName = repr(path).encode('utf-8') + filename = "%s" % _hash(utfName).hexdigest() return os.path.join(ADDON_CACHE_BASEDIR, filename) diff --git a/resources/lib/clearcache.py b/resources/lib/clearcache.py index ca89643..54aaeeb 100644 --- a/resources/lib/clearcache.py +++ b/resources/lib/clearcache.py @@ -2,10 +2,7 @@ import os import sys - -import xbmc -import xbmcgui -import xbmcvfs +from kodi_six import xbmc, xbmcaddon, xbmcgui, xbmcvfs from xbmcaddon import Addon addon = Addon('plugin.video.telequebec') diff --git a/resources/lib/content.py b/resources/lib/content.py index d95e361..a006b55 100644 --- a/resources/lib/content.py +++ b/resources/lib/content.py @@ -1,9 +1,14 @@ # -*- coding: utf-8 -*- # version 3.2.2 - By dualB -import sys, simplejson, re, xbmcaddon,xbmc +import sys, re +from kodi_six import xbmc, xbmcaddon from . import cache, html, log, parse -import simplejson as json + +try: + import json +except ImportError: + import simplejson as json if sys.version_info.major >= 3: # Python 3 stuff @@ -252,17 +257,18 @@ def getImage(url,width,height): return link def getShow(mediaBundleId): - database = simplejson.loads(cache.get_cached_content(MEDIA_BUNDLE_URL + str(mediaBundleId))) + database = json.loads(cache.get_cached_content(MEDIA_BUNDLE_URL + str(mediaBundleId))) return database['data'] def getLinkPop(url): - database = simplejson.loads(cache.get_cached_content(POPULAIRE_URL + str(url))) + + database = json.loads(cache.get_cached_content(POPULAIRE_URL + str(url))) return database['data'][0] def getJsonBlock(url, block): dataBlock = [] try: - db = simplejson.loads(cache.get_cached_content(url)) + db = json.loads(cache.get_cached_content(url)) dataBlock = db['data'][block]['items'] except Exception: dataBlock = [] diff --git a/resources/lib/html.py b/resources/lib/html.py index 654992c..56c153c 100644 --- a/resources/lib/html.py +++ b/resources/lib/html.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # version 3.2.2 - By dualB -import sys, re, socket, xbmc, ssl +import sys, re, socket, ssl +from kodi_six import xbmc from . import log if sys.version_info.major >= 3: diff --git a/resources/lib/log.py b/resources/lib/log.py index b81630f..3f809b0 100644 --- a/resources/lib/log.py +++ b/resources/lib/log.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # version 3.2.2 - By dualB -import xbmcaddon, xbmc +from kodi_six import xbmc, xbmcaddon def log(msg): """ function docstring """ diff --git a/resources/lib/navig.py b/resources/lib/navig.py index 12d65f6..61bb115 100644 --- a/resources/lib/navig.py +++ b/resources/lib/navig.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # version 3.2.2 - By dualB -import sys, xbmcgui, xbmcplugin, xbmcaddon, re, simplejson, xbmc +import sys, re, simplejson +from kodi_six import xbmc, xbmcaddon, xbmcplugin, xbmcgui from . import log, parse, content, cache if sys.version_info.major >= 3: @@ -135,7 +136,9 @@ def ajouterVideo(show): resume = name.lstrip() liz = xbmcgui.ListItem(\ - remove_any_html_tags(name), iconImage=ADDON_IMAGES_BASEPATH+"default-video.png", thumbnailImage=iconimage) + # remove_any_html_tags(name), iconImage=ADDON_IMAGES_BASEPATH+"default-video.png", thumbnailImage=iconimage) + remove_any_html_tags(name)) + liz.setArt({'icon': ADDON_IMAGES_BASEPATH+"default-video.png"}) liz.setInfo(\ type="Video",\ infoLabels={\ @@ -194,8 +197,8 @@ def jouer_video(url,media_uid): if uri: item = xbmcgui.ListItem(\ video_json['title'],\ - iconImage=thumbnail_url,\ - thumbnailImage=thumbnail_url, path=uri) + path=uri) + item.setArt({'icon': thumbnail_url}) play_item = xbmcgui.ListItem(path=uri) xbmcplugin.setResolvedUrl(__handle__,True, item) else: From 9086f253e9811acbe1e7b89599d4983a8d21f236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Jalette?= Date: Mon, 7 Feb 2022 22:45:49 -0500 Subject: [PATCH 05/10] replace deprecated inputstreamaddon property. Restore inputstream.adaptive dependency. Fix settings strings (hardcoded) + other python 2 to 3 migration fixes (some) videos are playing ! --- addon.xml | 2 +- resources/lib/cache.py | 8 ++++++-- resources/lib/navig.py | 27 ++++++++++++++++++--------- resources/lib/parse.py | 2 +- resources/settings.xml | 22 +++++++++++----------- 5 files changed, 37 insertions(+), 24 deletions(-) diff --git a/addon.xml b/addon.xml index ed5b4cc..2da24a2 100644 --- a/addon.xml +++ b/addon.xml @@ -8,7 +8,7 @@ - + diff --git a/resources/lib/cache.py b/resources/lib/cache.py index 6a17f49..91ba346 100644 --- a/resources/lib/cache.py +++ b/resources/lib/cache.py @@ -33,14 +33,18 @@ def get_cached_content(path,verified=True,headers=[]): filename = get_cached_filename(path) if os.path.exists(filename) and not is_cached_content_expired(os.path.getmtime(filename)): log.log('Lecture en CACHE du contenu suivant :' + path) - content = open(filename).read() + with io.open(filename, 'r', encoding='utf-8') as fo: + content = fo.read() else: + log.log('Lecture en LIGNE du contenu suivant :' + path) content = html.get_url_txt(path,verified,headers) if len(content)>0: try: if sys.version >= "3": - file(filename, "w").write(content) # cache the requested web content + with io.open(filename, 'w', encoding='utf-8') as fo: + fo.write(content) + # open(filename, "w", encoding="utf-8").write(content) # cache the requested web content else: open(filename, "w").write(content) # cache the requested web content except Exception: diff --git a/resources/lib/navig.py b/resources/lib/navig.py index 61bb115..98ee3bb 100644 --- a/resources/lib/navig.py +++ b/resources/lib/navig.py @@ -1,10 +1,15 @@ # -*- coding: utf-8 -*- # version 3.2.2 - By dualB -import sys, re, simplejson +import sys, re from kodi_six import xbmc, xbmcaddon, xbmcplugin, xbmcgui from . import log, parse, content, cache +try: + import json +except ImportError: + import simplejson as json + if sys.version_info.major >= 3: # Python 3 stuff from urllib.parse import quote_plus, unquote, quote @@ -82,7 +87,7 @@ def ajouterRepertoire(show): """ function docstring """ entry_url = sys.argv[0]+"?url="+url+\ "&mode=1"+\ - "&filters="+quote(simplejson.dumps(filtres)) + "&filters="+quote(json.dumps(filtres)) is_it_ok = True liz = xbmcgui.ListItem(nom) @@ -155,10 +160,12 @@ def ajouterVideo(show): liz.setProperty('IsPlayable', 'true') #Assumé que tous les liens sont pour Brightcove - liz.setProperty('inputstreamaddon', 'inputstream.adaptive') - liz.setProperty('inputstream.adaptive.manifest_type', 'mpd') - liz.setMimeType('application/dash+xml') liz.setContentLookup(False) + #deprecated inputstreamaddon prop was causing playback failure + liz.setProperty('inputstream', 'inputstream.adaptive') + liz.setProperty('inputstream.adaptive.manifest_type', 'mpd') + liz.setMimeType('application/xml+dash') + is_it_ok = xbmcplugin.addDirectoryItem(handle=__handle__, url=entry_url, listitem=liz, isFolder=False) return is_it_ok @@ -181,7 +188,7 @@ def liveStreamURL(): return 'https://bcovlive-a.akamaihd.net/575d86160eb143458d51f7ab187a4e68/us-east-1/6101674910001/' + obtenirMeilleurStream(a,'profile') def jouer_video(url,media_uid): - + #import web_pdb; web_pdb.set_trace() if "live" in url: jouer_live() else: @@ -190,7 +197,7 @@ def jouer_video(url,media_uid): refID = ref[len(ref)-1] - video_json = simplejson.loads(cache.get_cached_content('https://mnmedias.api.telequebec.tv/api/v4/player/%s' % refID)) + video_json = json.loads(cache.get_cached_content('https://mnmedias.api.telequebec.tv/api/v4/player/%s' % refID)) thumbnail_url = content.getImage(video_json['imageUrlTemplate'], '320', '180') uri = getURI(video_json,refID) @@ -213,11 +220,13 @@ def getURI(video_json,refID): return m3u8BC(stream['sourceId']) def m3u8BC(sourceId): + if sourceId == '6155415616001': + import web_pdb; web_pdb.set_trace() config = getBrightcoveConfig() log.log('KEY : %s' % config['key']) log.log('Ad_Config_ID : %s' %config['ad']) header = {'key':'Accept','value':'application/json;pk=%s'% config['key'] } - a= simplejson.loads(cache.get_cached_content('https://edge.api.brightcove.com/playback/v1/accounts/6150020952001/videos/%s?ad_config_id=%s' %(sourceId,config['ad']) ,True,[header])) + a= json.loads(cache.get_cached_content('https://edge.api.brightcove.com/playback/v1/accounts/6150020952001/videos/%s?ad_config_id=%s' %(sourceId,config['ad']) ,True,[header])) last = None for source in a['sources']: protocol = "dash+xml" @@ -236,7 +245,7 @@ def getBrightcoveConfig(): answer['ad'] = 'dcd6de5f-a864-4ef6-b416-dcdc4f4af216' try: data = cache.get_cached_content('https://players.brightcove.net/6150020952001/default_default/config.json',True) - jsonData = simplejson.loads(data) + jsonData = json.loads(data) answer['key'] =jsonData['video_cloud']['policy_key'] answer['ad'] = jsonData['ad_config_id'] diff --git a/resources/lib/parse.py b/resources/lib/parse.py index 43e1437..606c7e4 100644 --- a/resources/lib/parse.py +++ b/resources/lib/parse.py @@ -31,7 +31,7 @@ def ListeVideosGroupees(filtres): if index >= len(filtresShow): return liste else: - groupBy = filtresShow.keys()[index] + groupBy = list(filtresShow)[index] showsGroupes = {} cle = '' diff --git a/resources/settings.xml b/resources/settings.xml index 8fc799b..cec83c0 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -1,21 +1,21 @@ - - - - - + + + + + - - - - + + + + --> - - + + From 6f2ad6cf0044e38fbd48378af0a70c2b6260333a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Jalette?= Date: Mon, 7 Feb 2022 22:58:11 -0500 Subject: [PATCH 06/10] fix thumbnails not showing --- resources/lib/navig.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/lib/navig.py b/resources/lib/navig.py index 98ee3bb..f9b3970 100644 --- a/resources/lib/navig.py +++ b/resources/lib/navig.py @@ -143,7 +143,8 @@ def ajouterVideo(show): liz = xbmcgui.ListItem(\ # remove_any_html_tags(name), iconImage=ADDON_IMAGES_BASEPATH+"default-video.png", thumbnailImage=iconimage) remove_any_html_tags(name)) - liz.setArt({'icon': ADDON_IMAGES_BASEPATH+"default-video.png"}) + #liz.setArt({'icon': ADDON_IMAGES_BASEPATH+"default-video.png"}) + liz.setArt({ 'thumb' : iconimage } ) liz.setInfo(\ type="Video",\ infoLabels={\ @@ -220,8 +221,6 @@ def getURI(video_json,refID): return m3u8BC(stream['sourceId']) def m3u8BC(sourceId): - if sourceId == '6155415616001': - import web_pdb; web_pdb.set_trace() config = getBrightcoveConfig() log.log('KEY : %s' % config['key']) log.log('Ad_Config_ID : %s' %config['ad']) From ffe230a67f9d5fdef9107526f0dc69d6193c571b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Jalette?= Date: Thu, 10 Feb 2022 21:09:01 -0500 Subject: [PATCH 07/10] remove debug tool --- addon.xml | 3 +-- default.py | 2 +- resources/lib/navig.py | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/addon.xml b/addon.xml index 2da24a2..f4bf504 100644 --- a/addon.xml +++ b/addon.xml @@ -6,10 +6,9 @@ - + - video diff --git a/default.py b/default.py index f8eaac7..33296fc 100644 --- a/default.py +++ b/default.py @@ -2,7 +2,7 @@ # version 3.2.2 - By dualB -import os, sys, traceback, simplejson, web_pdb +import os, sys, traceback, simplejson from kodi_six import xbmcaddon, xbmcplugin, xbmcvfs, xbmc from resources.lib.log import log diff --git a/resources/lib/navig.py b/resources/lib/navig.py index f9b3970..7116f62 100644 --- a/resources/lib/navig.py +++ b/resources/lib/navig.py @@ -189,7 +189,6 @@ def liveStreamURL(): return 'https://bcovlive-a.akamaihd.net/575d86160eb143458d51f7ab187a4e68/us-east-1/6101674910001/' + obtenirMeilleurStream(a,'profile') def jouer_video(url,media_uid): - #import web_pdb; web_pdb.set_trace() if "live" in url: jouer_live() else: From 04330403682d6d60a40515c8422710448d8d0652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Jalette?= Date: Thu, 10 Feb 2022 21:13:47 -0500 Subject: [PATCH 08/10] remove kodi-six dependency as it is not used. Cleanup imports --- addon.xml | 1 - default.py | 2 +- resources/lib/cache.py | 2 +- resources/lib/clearcache.py | 2 +- resources/lib/content.py | 2 +- resources/lib/html.py | 1 - resources/lib/log.py | 2 +- resources/lib/navig.py | 2 +- 8 files changed, 6 insertions(+), 8 deletions(-) diff --git a/addon.xml b/addon.xml index f4bf504..1037d89 100644 --- a/addon.xml +++ b/addon.xml @@ -6,7 +6,6 @@ - diff --git a/default.py b/default.py index 33296fc..fd41fca 100644 --- a/default.py +++ b/default.py @@ -3,7 +3,7 @@ # version 3.2.2 - By dualB import os, sys, traceback, simplejson -from kodi_six import xbmcaddon, xbmcplugin, xbmcvfs, xbmc +import xbmcaddon, xbmcplugin, xbmcvfs from resources.lib.log import log from resources.lib import content, navig diff --git a/resources/lib/cache.py b/resources/lib/cache.py index 91ba346..e93d6f5 100644 --- a/resources/lib/cache.py +++ b/resources/lib/cache.py @@ -2,7 +2,7 @@ # version 3.2.2 - By dualB import os, time, sys, io -from kodi_six import xbmcaddon, xbmcvfs, xbmc +import xbmcaddon, xbmcvfs from . import log, html ADDON = xbmcaddon.Addon() diff --git a/resources/lib/clearcache.py b/resources/lib/clearcache.py index 54aaeeb..9c71306 100644 --- a/resources/lib/clearcache.py +++ b/resources/lib/clearcache.py @@ -2,7 +2,7 @@ import os import sys -from kodi_six import xbmc, xbmcaddon, xbmcgui, xbmcvfs +import xbmcaddon, xbmcgui, xbmcvfs from xbmcaddon import Addon addon = Addon('plugin.video.telequebec') diff --git a/resources/lib/content.py b/resources/lib/content.py index a006b55..3700361 100644 --- a/resources/lib/content.py +++ b/resources/lib/content.py @@ -2,7 +2,7 @@ # version 3.2.2 - By dualB import sys, re -from kodi_six import xbmc, xbmcaddon +import xbmcaddon from . import cache, html, log, parse try: diff --git a/resources/lib/html.py b/resources/lib/html.py index 56c153c..29ee3d4 100644 --- a/resources/lib/html.py +++ b/resources/lib/html.py @@ -2,7 +2,6 @@ # version 3.2.2 - By dualB import sys, re, socket, ssl -from kodi_six import xbmc from . import log if sys.version_info.major >= 3: diff --git a/resources/lib/log.py b/resources/lib/log.py index 3f809b0..c5fba7e 100644 --- a/resources/lib/log.py +++ b/resources/lib/log.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # version 3.2.2 - By dualB -from kodi_six import xbmc, xbmcaddon +import xbmc, xbmcaddon def log(msg): """ function docstring """ diff --git a/resources/lib/navig.py b/resources/lib/navig.py index 7116f62..ecf9995 100644 --- a/resources/lib/navig.py +++ b/resources/lib/navig.py @@ -2,7 +2,7 @@ # version 3.2.2 - By dualB import sys, re -from kodi_six import xbmc, xbmcaddon, xbmcplugin, xbmcgui +import xbmc, xbmcaddon, xbmcplugin, xbmcgui from . import log, parse, content, cache try: From 24bd994ec55b68bbecedf07f5b4f51ff923ba02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Jalette?= Date: Thu, 10 Feb 2022 21:24:17 -0500 Subject: [PATCH 09/10] use json in kodi 19 to replace simplejson --- default.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/default.py b/default.py index fd41fca..b142514 100644 --- a/default.py +++ b/default.py @@ -2,12 +2,17 @@ # version 3.2.2 - By dualB -import os, sys, traceback, simplejson +import os, sys, traceback import xbmcaddon, xbmcplugin, xbmcvfs from resources.lib.log import log from resources.lib import content, navig +try: + import json +except ImportError: + import simplejson as json + if sys.version_info.major >= 3: # Python 3 stuff from urllib.parse import quote_plus, unquote_plus, unquote @@ -79,7 +84,7 @@ def set_sorting_methods(mode): except Exception: pass -filtres = simplejson.loads(FILTERS) +filtres = json.loads(FILTERS) if SOURCE_ID !='': navig.jouer_video(URL,SOURCE_ID) From 7d24ab0d163cdd215934e646d1193685a202d31f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Jalette?= Date: Thu, 10 Feb 2022 21:56:15 -0500 Subject: [PATCH 10/10] dependency cleanup --- addon.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/addon.xml b/addon.xml index 1037d89..dee9be0 100644 --- a/addon.xml +++ b/addon.xml @@ -4,8 +4,6 @@ version="4.0.0" provider-name="dualB"> - -