explora
This commit is contained in:
@@ -140,6 +140,11 @@ def remove_format(string):
|
||||
#logger.debug('sale de remove: %s' % string)
|
||||
return string
|
||||
|
||||
def normalize(string):
|
||||
string = string.decode('utf-8')
|
||||
normal = ''.join((c for c in unicodedata.normalize('NFD', unicode(string)) if unicodedata.category(c) != 'Mn'))
|
||||
return normal
|
||||
|
||||
def simplify(string):
|
||||
|
||||
#logger.info()
|
||||
@@ -148,9 +153,11 @@ def simplify(string):
|
||||
string = string.replace('-',' ').replace('_',' ')
|
||||
string = re.sub(r'\d+','', string)
|
||||
string = string.strip()
|
||||
string = string.decode('utf-8')
|
||||
notilde = ''.join((c for c in unicodedata.normalize('NFD', unicode(string)) if unicodedata.category(c) != 'Mn'))
|
||||
string = notilde.decode()
|
||||
notilde = normalize(string)
|
||||
try:
|
||||
string = notilde.decode()
|
||||
except:
|
||||
pass
|
||||
string = string.lower()
|
||||
#logger.debug('sale de simplify: %s' % string)
|
||||
|
||||
@@ -410,6 +417,15 @@ def title_format(item):
|
||||
if lang:
|
||||
item.title = add_languages(item.title, simple_language)
|
||||
|
||||
|
||||
# Para las busquedas por canal
|
||||
if item.from_channel != '':
|
||||
from core import channeltools
|
||||
channel_parameters = channeltools.get_channel_parameters(item.from_channel)
|
||||
logger.debug(channel_parameters)
|
||||
item.title = '%s [%s]' % (item.title, channel_parameters['title'])
|
||||
|
||||
|
||||
# Formato para actualizaciones de series en la videoteca sobreescribe los colores anteriores
|
||||
|
||||
if item.channel=='videolibrary' and item.context!='':
|
||||
|
||||
Reference in New Issue
Block a user