Example #1
0
def tmdb_tv_genres():
    genres = nav_base.get_tv_genres()
    items = sorted([{
        'label': name,
        'path': plugin.url_for('tmdb_tv_genre', id=id, page=1),
        'thumbnail': nav_base.get_genre_icon(id),
        'fanart': plugin.get_addon_fanart()
    } for id, name in genres.items()],
                   key=lambda k: k['label'])
    return items
Example #2
0
def tmdb_movies_genres():
	genres = nav_base.get_base_genres()
	items = sorted([
		{
			'label': name,
			'path': plugin.url_for('tmdb_movies_genre', id=id, page=1),
			'thumbnail': nav_base.get_genre_icon(id),
			'fanart': plugin.get_addon_fanart(),
			'context_menu': [
				('Play (random)', 'RunPlugin(%s)' % plugin.url_for('tmdb_movies_play_random_genre', id = id))]
		} for id, name in genres.items()], key=lambda k: k['label'])
	return plugin.finish(items=items, sort_methods=SORT)