Aggiunta opzione solo canali
This commit is contained in:
@@ -188,31 +188,32 @@ def filterchannels(category, view="thumb_"):
|
||||
|
||||
channelslist.sort(key=lambda item: item.title.lower().strip())
|
||||
|
||||
if category == "all":
|
||||
channel_parameters = channeltools.get_channel_parameters('url')
|
||||
# If you prefer the banner and the channel has it, now change your mind
|
||||
if view == "banner_" and "banner" in channel_parameters:
|
||||
channel_parameters["thumbnail"] = channel_parameters["banner"]
|
||||
if not config.get_setting("only_channel_icons"):
|
||||
if category == "all":
|
||||
channel_parameters = channeltools.get_channel_parameters('url')
|
||||
# If you prefer the banner and the channel has it, now change your mind
|
||||
if view == "banner_" and "banner" in channel_parameters:
|
||||
channel_parameters["thumbnail"] = channel_parameters["banner"]
|
||||
|
||||
channelslist.insert(0, Item(title=config.get_localized_string(60088), action="mainlist", channel="url",
|
||||
thumbnail=channel_parameters["thumbnail"], type="generic", viewmode="list"))
|
||||
# Special Category
|
||||
if category in ['movie', 'tvshow']:
|
||||
titles = [config.get_localized_string(70028), config.get_localized_string(30985), config.get_localized_string(70559), config.get_localized_string(60264), config.get_localized_string(70560)]
|
||||
ids = ['popular', 'top_rated', 'now_playing', 'on_the_air']
|
||||
for x in range(0,3):
|
||||
if x == 2 and category != 'movie':
|
||||
title=titles[x+1]
|
||||
id = ids[x+1]
|
||||
else:
|
||||
title=titles[x]
|
||||
id = ids[x]
|
||||
channelslist.insert(x,
|
||||
Item(channel='search', action='discover_list', title=title, search_type='list',
|
||||
list_type='%s/%s' % (category.replace('show',''), id), mode=category, thumbnail=get_thumb(id+".png")))
|
||||
channelslist.insert(0, Item(title=config.get_localized_string(60088), action="mainlist", channel="url",
|
||||
thumbnail=channel_parameters["thumbnail"], type="generic", viewmode="list"))
|
||||
# Special Category
|
||||
if category in ['movie', 'tvshow']:
|
||||
titles = [config.get_localized_string(70028), config.get_localized_string(30985), config.get_localized_string(70559), config.get_localized_string(60264), config.get_localized_string(70560)]
|
||||
ids = ['popular', 'top_rated', 'now_playing', 'on_the_air']
|
||||
for x in range(0,3):
|
||||
if x == 2 and category != 'movie':
|
||||
title=titles[x+1]
|
||||
id = ids[x+1]
|
||||
else:
|
||||
title=titles[x]
|
||||
id = ids[x]
|
||||
channelslist.insert(x,
|
||||
Item(channel='search', action='discover_list', title=title, search_type='list',
|
||||
list_type='%s/%s' % (category.replace('show',''), id), mode=category, thumbnail=get_thumb(id+".png")))
|
||||
|
||||
channelslist.insert(3, Item(channel='search', action='genres_menu', title=config.get_localized_string(30987),
|
||||
type=category.replace('show',''), mode=category ,thumbnail=get_thumb("genres.png")))
|
||||
channelslist.insert(3, Item(channel='search', action='genres_menu', title=config.get_localized_string(30987),
|
||||
type=category.replace('show',''), mode=category ,thumbnail=get_thumb("genres.png")))
|
||||
|
||||
return channelslist
|
||||
|
||||
|
||||
Reference in New Issue
Block a user