piccoli fix
This commit is contained in:
+3
-1
@@ -165,8 +165,10 @@ def dirette(item):
|
|||||||
onAir = current_session.get(onair).json()['on_air']
|
onAir = current_session.get(onair).json()['on_air']
|
||||||
for i, key in enumerate(json):
|
for i, key in enumerate(json):
|
||||||
itemlist.append(support.Item(channel = item.channel, title = support.typo(key['channel'], 'bold'), fulltitle = key['channel'], show = key['channel'],
|
itemlist.append(support.Item(channel = item.channel, title = support.typo(key['channel'], 'bold'), fulltitle = key['channel'], show = key['channel'],
|
||||||
thumbnail = key['transparent-icon'].replace("[RESOLUTION]", "256x-"), fanart = getUrl(onAir[i]['currentItem']['image']), url = key['video']['contentUrl'],
|
thumbnail = key['transparent-icon'].replace("[RESOLUTION]", "256x-"),forcethumb=True , fanart = getUrl(onAir[i]['currentItem']['image']), url = key['video']['contentUrl'],
|
||||||
plot = support.typo(onAir[i]['currentItem']['name'],'bold')+ '\n\n' + onAir[i]['currentItem']['description'], action = 'play'))
|
plot = support.typo(onAir[i]['currentItem']['name'],'bold')+ '\n\n' + onAir[i]['currentItem']['description'], action = 'play'))
|
||||||
|
for item in itemlist:
|
||||||
|
support.log(item)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-4
@@ -165,8 +165,8 @@ 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'].encode('utf8').lower():
|
if 'stagione' in encode(key['title']).lower():
|
||||||
match = support.match(key['title'].encode('utf8'), patron=r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)').match
|
match = support.match(encode(key['title']), patron=r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)').match
|
||||||
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):
|
||||||
@@ -228,10 +228,10 @@ 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'].encode('utf8').lower():
|
if search.lower() in encode(key['title']).lower():
|
||||||
infoLabels['year'] = key['date_published']
|
infoLabels['year'] = key['date_published']
|
||||||
infoLabels['title'] = infoLabels['tvshowtitle'] = key['title']
|
infoLabels['title'] = infoLabels['tvshowtitle'] = key['title']
|
||||||
title = key['title'].encode('utf8')
|
title = encode(key['title'])
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(
|
Item(
|
||||||
channel = item.channel,
|
channel = item.channel,
|
||||||
@@ -246,3 +246,9 @@ def make_itemlist(itemlist, item, data):
|
|||||||
infoLabels=infoLabels
|
infoLabels=infoLabels
|
||||||
))
|
))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
def encode(text):
|
||||||
|
if sys.version_info[0] >= 3:
|
||||||
|
return text
|
||||||
|
else:
|
||||||
|
return text.encode('utf8')
|
||||||
@@ -120,7 +120,7 @@ def unescape(text):
|
|||||||
pass
|
pass
|
||||||
return text # leave as is
|
return text # leave as is
|
||||||
|
|
||||||
return re.sub("&#?\w+;", fixup, text)
|
return re.sub("&#?\w+;", str(fixup), str(text))
|
||||||
|
|
||||||
# Convierte los codigos html "ñ" y lo reemplaza por "ñ" caracter unicode utf-8
|
# Convierte los codigos html "ñ" y lo reemplaza por "ñ" caracter unicode utf-8
|
||||||
|
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ def render_items(itemlist, parent_item):
|
|||||||
item.folder = False
|
item.folder = False
|
||||||
if item.fanart == "":
|
if item.fanart == "":
|
||||||
item.fanart = parent_item.fanart
|
item.fanart = parent_item.fanart
|
||||||
if item.action == 'play' and thumb_type == 1:
|
if item.action == 'play' and thumb_type == 1 and not item.forcethumb:
|
||||||
item.thumbnail = "https://github.com/kodiondemand/media/raw/master/resources/servers/" + item.server.lower() + '.png'
|
item.thumbnail = "https://github.com/kodiondemand/media/raw/master/resources/servers/" + item.server.lower() + '.png'
|
||||||
|
|
||||||
# if cloudflare, cookies are needed to display images taken from site
|
# if cloudflare, cookies are needed to display images taken from site
|
||||||
|
|||||||
Reference in New Issue
Block a user