From 5363031f4ef75255636092d144a463fe34be9e93 Mon Sep 17 00:00:00 2001 From: marco <10120390+mac12m99@users.noreply.github.com> Date: Wed, 18 Nov 2020 16:49:31 +0100 Subject: [PATCH] kodi 19: validatePath e makeLegalFilename nel modulo xbmcvfs --- channels/cinemalibero.py | 2 +- default.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/channels/cinemalibero.py b/channels/cinemalibero.py index a020b465..2600aac8 100644 --- a/channels/cinemalibero.py +++ b/channels/cinemalibero.py @@ -59,7 +59,7 @@ def peliculas(item): patron = r'[^\)]+)\)">' elif item.contentType == 'tvshow': if item.args == 'update': - patron = r'.+?)\)">\s
(?P.+?)(?: – Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>[ ](?:<div class="genere">)?(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)' + patron = r'<a href="(?P<url>[^"]+)"[^<]+?url\((?P<thumb>.+?)\)">\s+<div class="titolo">(?P<title>.+?)(?: – Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>[ ](?:<div class="genere">)?(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)' pagination = 25 else: patron = r'<a href="(?P<url>[^"]+)"\s*title="(?P<title>[^"\(]+)(?:"|\()(?:(?P<year>\d+)[^"]+)?.*?url\((?P<thumb>[^\)]+)\)(?:.*?<div class="voto">[^>]+>[^>]+>\s*(?P<rating>[^<]+))?.*?<div class="titolo">[^>]+>(?:<div class="genere">[^ ]*(?:\s\d+)?\s*(?:\()?(?P<lang>[^\)< ]+))?' diff --git a/default.py b/default.py index 006074e4..a8ccc0bb 100644 --- a/default.py +++ b/default.py @@ -8,10 +8,12 @@ import sys import xbmc -# on kodi 18 its xbmc.translatePath, on 19 xbmcvfs.translatePath +# functions that on kodi 19 moved to xbmcvfs try: import xbmcvfs xbmc.translatePath = xbmcvfs.translatePath + xbmc.validatePath = xbmcvfs.validatePath + xbmc.makeLegalFilename = xbmcvfs.makeLegalFilename except: pass from platformcode import config, logger