Formattazione Titoli in render_items + correzione di alcuni canali
This commit is contained in:
@@ -317,6 +317,7 @@ def render_items(itemlist, parent_item):
|
||||
logger.debug('START render_items')
|
||||
thumb_type = config.get_setting('video_thumbnail_type')
|
||||
from platformcode import shortcuts
|
||||
from core.support import typo
|
||||
# from core import httptools
|
||||
_handle = int(sys.argv[1])
|
||||
default_fanart = config.get_fanart()
|
||||
@@ -358,7 +359,30 @@ def render_items(itemlist, parent_item):
|
||||
# break
|
||||
|
||||
icon_image = "DefaultFolder.png" if item.folder else "DefaultVideo.png"
|
||||
listitem = xbmcgui.ListItem(item.title)
|
||||
|
||||
title = item.title
|
||||
episode = ''
|
||||
|
||||
if type(item.contentSeason) == int and type(item.contentEpisodeNumber) == int and not parent_item.onlyep:
|
||||
episode = '{}x{:02d}'.format(item.contentSeason, item.contentEpisodeNumber)
|
||||
elif type(item.contentEpisodeNumber) == int:
|
||||
episode = '{:02d}'.format(item.contentEpisodeNumber)
|
||||
if episode and item.episode2:
|
||||
if len(item.episode2) < 4: episode = '{}-{}'.format(episode, '-'.join('{:02d}'.format(e) for e in item.episode2))
|
||||
else: episode = '{} -> {:02d}'.format(episode, item.episode2[-1])
|
||||
if episode: title = '{}. {}'.format(episode, title)
|
||||
if item.title2: title = '{} - {}'.format(title, item.title2)
|
||||
|
||||
if not config.get_setting('format_title') and title[:1] not in ['[', '•']:
|
||||
server = typo(item.server, '_ []') if item.server else ''
|
||||
quality = typo(item.quality, '_ [] color kod') if item.quality else ''
|
||||
lang = typo(item.contentLanguage, '_ [] color kod') if item.contentLanguage else ''
|
||||
extra = typo(item.extraInfo, '_ [] color kod') if item.extraInfo else ''
|
||||
|
||||
|
||||
title = '[B]{}{}[/B]{}{}{}'.format(title, server, quality, lang, extra)
|
||||
|
||||
listitem = xbmcgui.ListItem(title)
|
||||
art = {'icon': icon_image, 'thumb': item.thumbnail, 'poster': item.thumbnail, 'fanart': item.fanart if item.fanart else default_fanart}
|
||||
if item.infoLabels.get('landscape'): art['landscape'] = item.infoLabels['landscape']
|
||||
if item.infoLabels.get('clearlogo'): art['clearlogo'] = item.infoLabels['clearlogo']
|
||||
|
||||
Reference in New Issue
Block a user