From 4610ba71afd4a2381757a6553baabd265f2badcc Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Sat, 30 Oct 2021 11:39:06 +0200 Subject: [PATCH] Miglioria ricerca globale --- core/scrapertools.py | 2 +- specials/globalsearch.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/scrapertools.py b/core/scrapertools.py index 8961dfef..362f5004 100644 --- a/core/scrapertools.py +++ b/core/scrapertools.py @@ -490,7 +490,7 @@ def title_unify(title): if cat != 'Mn': if cat == 'Pd': c_new = '-' - elif cat in ['Ll', 'Lu'] or c == ':': + elif cat in ['Ll', 'Lu', 'Nd'] or c == ':': c_new = c else: c_new = ' ' diff --git a/specials/globalsearch.py b/specials/globalsearch.py index b8380cd3..35b1c9d4 100644 --- a/specials/globalsearch.py +++ b/specials/globalsearch.py @@ -395,8 +395,10 @@ class SearchWindow(xbmcgui.WindowXML): if self.exit: return # some channels may use original title if self.item.mode != 'all' and not valid and self.item.infoLabels.get('originaltitle'): - logger.debug('retring with original title on channel ' + channel) - dummy, valid, dummy = search(self.item.infoLabels.get('originaltitle')) + original = scrapertools.title_unify(self.item.infoLabels.get('originaltitle')) + if self.item.text != original: + logger.debug('retring with original title on channel ' + channel) + dummy, valid, dummy = search(original) except: import traceback logger.error(traceback.format_exc())