Fix VVVVID

This commit is contained in:
Alhaziel01
2019-11-04 23:12:01 +01:00
parent 2e6460c7ab
commit d2af1a86da
+9 -9
View File
@@ -137,12 +137,12 @@ def episodios(item):
episodes.append(episode['episodes']) episodes.append(episode['episodes'])
for episode in episodes: for episode in episodes:
for key in episode: for key in episode:
if 'stagione' in key['title'].lower(): if 'stagione' in key['title'].encode('utf8').lower():
match = support.match(key['title'].encode('ascii', 'replace'), r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)')[0][0] match = support.match(key['title'].encode('utf8'), r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)')[0][0]
title = match[0]+'x'+match[1] + ' - ' + item.fulltitle title = match[0]+'x'+match[1] + ' - ' + item.fulltitle
make_item = True make_item = True
elif int(key['season_id']) == int(season_id): elif int(key['season_id']) == int(season_id):
title = 'Episodio ' + key['number'] + ' - ' + key['title'].encode('ascii', 'replace'), title = 'Episodio ' + key['number'] + ' - ' + key['title'].encode('utf8'),
make_item = True make_item = True
else: else:
make_item = False make_item = False
@@ -193,21 +193,21 @@ def make_itemlist(itemlist, item, data):
search = item.search if item.search else '' search = item.search if item.search else ''
infoLabels = {} infoLabels = {}
for key in data['data']: for key in data['data']:
if search.lower() in key['title'].lower(): if search.lower() in key['title'].encode('utf8').lower():
infoLabels['year'] = key['date_published'] infoLabels['year'] = key['date_published']
infoLabels['title'] = infoLabels['tvshowtitle'] = key['title'] infoLabels['title'] = infoLabels['tvshowtitle'] = key['title']
support.log(infoLabels) title = key['title'].encode('utf8')
itemlist.append( itemlist.append(
Item( Item(
channel = item.channel, channel = item.channel,
title = support.typo(key['title'], 'bold'), title = support.typo(title, 'bold'),
fulltitle= key['title'], fulltitle= title,
show= key['title'], show= title,
url= host + str(key['show_id']) + '/seasons/', url= host + str(key['show_id']) + '/seasons/',
action= 'findvideos' if item.contentType == 'movie' else 'episodios', action= 'findvideos' if item.contentType == 'movie' else 'episodios',
contentType = item.contentType, contentType = item.contentType,
contentSerieName= key['title'] if item.contentType != 'movie' else '', contentSerieName= key['title'] if item.contentType != 'movie' else '',
contentTitle= key['title'] if item.contentType == 'movie' else '', contentTitle= title if item.contentType == 'movie' else '',
infoLabels=infoLabels infoLabels=infoLabels
)) ))
return itemlist return itemlist