def list_main_menu(): # Initialise cached filters list if required if CACHE_FILTERS.get('list') is None: CACHE_FILTERS['list'] = [] filterCount = len(CACHE_FILTERS['list']) items = [{ 'label': _('filter') if filterCount == 0 else '%s ([COLOR blue]%s[/COLOR])' % (_('filter'), str(filterCount)), 'path': plugin.url_for('list_filters', hasSaved='False'), 'thumbnail': imagePath(plugin, 'art', 'filter.png') }, { 'label': _('channels'), 'path': plugin.url_for('list_all_channels'), 'thumbnail': imagePath(plugin, 'art', 'channels.png') }, { 'label': _('search'), 'path': plugin.url_for('search'), 'thumbnail': imagePath(plugin, 'art', 'search.png') }, { 'label': _('most_popular'), 'path': plugin.url_for('list_most_popular'), 'thumbnail': imagePath(plugin, 'art', 'most_popular.png') }, { 'label': _('date_released'), 'path': plugin.url_for('list_by_date_released'), 'thumbnail': imagePath(plugin, 'art', 'date_released.png') }] return items
def list_main_menu(): # Initialise cached filters list if required if CACHE_FILTERS.get("list") is None: CACHE_FILTERS["list"] = [] filterCount = len(CACHE_FILTERS["list"]) items = [ { "label": _("filter") if filterCount == 0 else "%s ([COLOR blue]%s[/COLOR])" % (_("filter"), str(filterCount)), "path": plugin.url_for("list_filters", hasSaved="False"), "thumbnail": imagePath(plugin, "art", "filter.png"), }, { "label": _("channels"), "path": plugin.url_for("list_all_channels"), "thumbnail": imagePath(plugin, "art", "channels.png"), }, {"label": _("search"), "path": plugin.url_for("search"), "thumbnail": imagePath(plugin, "art", "search.png")}, { "label": _("most_popular"), "path": plugin.url_for("list_most_popular"), "thumbnail": imagePath(plugin, "art", "most_popular.png"), }, { "label": _("date_released"), "path": plugin.url_for("list_by_date_released"), "thumbnail": imagePath(plugin, "art", "date_released.png"), }, ] return items
def list_episode_clip_choice(programID, episodeCount, clipsCount): items = [ { "label": "Episodes ([COLOR blue]%s[/COLOR] episode%s)" % (episodeCount, "s" if episodeCount > 1 else ""), "path": plugin.url_for("list_media_items", programID=programID, mediaType=MediaType.EPISODE), "thumbnail": imagePath(plugin, "art", "episodes.png"), }, { "label": "Clips ([COLOR blue]%s[/COLOR] clip%s)" % (clipsCount, "s" if clipsCount > 1 else ""), "path": plugin.url_for("list_media_items", programID=programID, mediaType=MediaType.CLIP), "thumbnail": imagePath(plugin, "art", "clips.png"), }, ] return plugin.finish(items)
def list_most_popular(): items = [ { "label": _("most_popular_episodes"), "path": plugin.url_for("list_most_watched", programType=MediaType.EPISODE), "thumbnail": imagePath(plugin, "art", "episodes.png"), }, { "label": _("most_popular_clips"), "path": plugin.url_for("list_most_watched", programType=MediaType.CLIP), "thumbnail": imagePath(plugin, "art", "clips.png"), }, ] return plugin.finish(items)
def list_most_popular(): items = [ { 'label': _('most_popular_episodes'), 'path': plugin.url_for('list_most_watched', programType=MediaType.EPISODE), 'thumbnail': imagePath(plugin, 'art', 'episodes.png') }, { 'label': _('most_popular_clips'), 'path': plugin.url_for('list_most_watched', programType=MediaType.CLIP), 'thumbnail': imagePath(plugin, 'art', 'clips.png') }, ] return plugin.finish(items)
def list_by_date_released(): items = [ { "label": _("latest_episodes"), "path": plugin.url_for("list_media_items_latest", mediaType=MediaType.EPISODE), "thumbnail": imagePath(plugin, "art", "episodes.png"), }, { "label": _("latest_programs"), "path": plugin.url_for("list_channel_programs", channelID=" "), "thumbnail": imagePath(plugin, "art", "programs.png"), }, { "label": _("latest_clips"), "path": plugin.url_for("list_media_items_latest", mediaType=MediaType.CLIP), "thumbnail": imagePath(plugin, "art", "clips.png"), }, ] return plugin.finish(items)
def list_by_date_released(): items = [{ 'label': _('latest_episodes'), 'path': plugin.url_for('list_media_items_latest', mediaType=MediaType.EPISODE), 'thumbnail': imagePath(plugin, 'art', 'episodes.png') }, { 'label': _('latest_programs'), 'path': plugin.url_for('list_channel_programs', channelID=' '), 'thumbnail': imagePath(plugin, 'art', 'programs.png') }, { 'label': _('latest_clips'), 'path': plugin.url_for('list_media_items_latest', mediaType=MediaType.CLIP), 'thumbnail': imagePath(plugin, 'art', 'clips.png') }] return plugin.finish(items)
def list_episode_clip_choice(programID, episodeCount, clipsCount): items = [{ 'label': "Episodes ([COLOR blue]%s[/COLOR] episode%s)" % (episodeCount, 's' if episodeCount > 1 else ''), 'path': plugin.url_for('list_media_items', programID=programID, mediaType=MediaType.EPISODE), 'thumbnail': imagePath(plugin, 'art', 'episodes.png') }, { 'label': "Clips ([COLOR blue]%s[/COLOR] clip%s)" % (clipsCount, 's' if clipsCount > 1 else ''), 'path': plugin.url_for('list_media_items', programID=programID, mediaType=MediaType.CLIP), 'thumbnail': imagePath(plugin, 'art', 'clips.png') }] return plugin.finish(items)