当前位置: 首页>>代码示例>>Python>>正文


Python base.get_icon_path函数代码示例

本文整理汇总了Python中meta.navigation.base.get_icon_path函数的典型用法代码示例。如果您正苦于以下问题:Python get_icon_path函数的具体用法?Python get_icon_path怎么用?Python get_icon_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_icon_path函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: total_setup

def total_setup():
    plugin.notify(msg="Total Setup", title="Started", delay=1000, image=get_icon_path("metalliq"))
    if player_setup() == True:
        pass
    if source_setup() == True:
        pass
    plugin.notify(msg="Total Setup", title="Completed", delay=5000, image=get_icon_path("metalliq"))
开发者ID:noobsandnerds,项目名称:noobsandnerds,代码行数:7,代码来源:addon.py

示例2: lists_trakt_liked_lists

def lists_trakt_liked_lists(page):
    lists, pages = trakt.trakt_get_liked_lists(page)
    items = []
    for list in lists:
        info = list["list"]
        name = info["name"]
        user = info["user"]["username"]
        slug = info["ids"]["slug"]
        items.append({
            'label': name,
            'path': plugin.url_for("lists_trakt_show_list", user = user, slug = slug),
            'context_menu': [
                (
                    _("Add list to library"),
                    "RunPlugin({0})".format(plugin.url_for("lists_trakt_add_all_to_library", user=user, slug=slug))
                )
            ],
            'icon': get_icon_path("traktlikedlists"),
        })
    if pages > page:
        items.append({
            'label': _("Next >>"),
            'path': plugin.url_for("lists_trakt_liked_lists", page = int(page) + 1),
            'icon': get_icon_path("traktlikedlists"),
        })
    if FORCE == True: return plugin.finish(items=items, sort_methods=SORT, view_mode=VIEW)
    else: return plugin.finish(items=items, sort_methods=SORT)
开发者ID:noobsandnerds,项目名称:noobsandnerds,代码行数:27,代码来源:lists.py

示例3: total

def total():
    xbmc.executebuiltin('SetProperty(running,totalmeta,home)')
    plugin.notify(msg=_('Automated install'), title=_('Started'), delay=1000, image=get_icon_path("meta"))
    url = "https://api.github.com/repos/OpenELEQ/unofficial-meta-players-verified/zipball"
    if updater.update_players(url):
        plugin.notify(msg=_('Players'), title=_('Updated'), delay=1000, image=get_icon_path("player"))
    else:
        plugin.notify(msg=_('Players update'), title=_('Failed'), delay=1000, image=get_icon_path("player"))
    xbmc.executebuiltin("RunPlugin(plugin://plugin.video.meta/settings/players/all/)")
    movielibraryfolder = plugin.get_setting(SETTING_MOVIES_LIBRARY_FOLDER)
    try:
        meta.library.movies.auto_movie_setup(movielibraryfolder)
        plugin.notify(msg=_('Movies library folder'), title=_('Setup Done'), delay=1000, image=get_icon_path("movies"))
    except:
        plugin.notify(msg=_('Movies library folder'), title=_('Setup Failed'), delay=1000, image=get_icon_path("movies"))
    tvlibraryfolder = plugin.get_setting(SETTING_TV_LIBRARY_FOLDER)
    try:
        meta.library.tvshows.auto_tv_setup(tvlibraryfolder)
        plugin.notify(msg=_('TVShows library folder'), title=_('Setup Done'), delay=1000, image=get_icon_path("tv"))
    except:
        plugin.notify(msg=_('TVShows library folder'), title=_('Setup Failed'), delay=1000, image=get_icon_path("player"))
    xbmc.sleep(5000)
    while xbmc.getCondVisibility("Window.IsActive(dialoginfo)"):
        if not xbmc.getCondVisibility("Window.IsActive(dialoginfo)"):
            break
    plugin.notify(msg=_('Automated install'), title=_('Completed'), delay=5000, image=get_icon_path("meta"))
    xbmc.executebuiltin('ClearProperty(running,home)')
开发者ID:OpenELEQ,项目名称:testing.meta.more,代码行数:27,代码来源:addon.py

示例4: root

def root():
    """ Root directory """
    items = [
        {
            'label': _("Movies"),
            'path': plugin.url_for("movies"),
            'icon': get_icon_path("movies"),
        },
        {
            'label': _("TV Shows"),
            'path': plugin.url_for("tv"),
            'icon': get_icon_path("tv"),
        },
        {
            'label': _("Live"),
            'path': plugin.url_for("live"),
            'icon': get_icon_path("live"),
        },
        {
            'label': _("Lists"),
            'path': plugin.url_for("lists"),
            'icon': get_icon_path("lists"),
        }
    ]
    
    fanart = plugin.addon.getAddonInfo('fanart')
    for item in items:
        item['properties'] = {'fanart_image' : fanart}
        
    return items
开发者ID:OpenELEQ,项目名称:testing.meta.more,代码行数:30,代码来源:addon.py

示例5: update_players

def update_players():
    url = plugin.get_setting(SETTING_PLAYERS_UPDATE_URL)
    if updater.update_players(url):
        plugin.notify(msg=_('Players'), title=_('Updated'), delay=1000, image=get_icon_path("player"))
    else:
        plugin.notify(msg=_('Players update'), title=_('Failed'), delay=1000, image=get_icon_path("player"))
    plugin.open_settings()
开发者ID:OpenELEQ,项目名称:testing.meta.more,代码行数:7,代码来源:addon.py

示例6: update_players

def update_players():
    url = plugin.get_setting(SETTING_PLAYERS_UPDATE_URL, converter=unicode)
    if updater.update_players(url):
        plugin.notify(msg=_("Players"), title=_("Updated"), delay=1000, image=get_icon_path("player"))
    else:
        plugin.notify(msg=_("Players update"), title=_("Failed"), delay=1000, image=get_icon_path("player"))
    plugin.open_settings()
开发者ID:noobsandnerds,项目名称:noobsandnerds,代码行数:7,代码来源:addon.py

示例7: tv

def tv():
    """ TV directory """
    items = [
        {
            'label': _("Search"),
            'path': plugin.url_for(tv_search),
            'icon': get_icon_path("search"),
        },
        {
            'label': _("Genres"),
            'path': plugin.url_for(tv_genres),
            'icon': get_icon_path("genres"),
        },
        {
            'label': _("Popular"),
            'path': plugin.url_for(tv_most_popular, page='1'),
            'icon': get_icon_path("popular"),
        },
        {
            'label': _("On the air"),
            'path': plugin.url_for(tv_now_playing, page='1'),
            'icon': get_icon_path("tv"),
        },
        {
            'label': _("Top rated"),
            'path': plugin.url_for(tv_top_rated, page='1'),
            'icon': get_icon_path("top_rated"),
        },
    ]
    
    fanart = plugin.addon.getAddonInfo('fanart')
    for item in items:
        item['properties'] = {'fanart_image' : fanart}

    return items
开发者ID:itzikg,项目名称:meta4kodi,代码行数:35,代码来源:tvshows.py

示例8: lists_trakt_my_lists

def lists_trakt_my_lists():
    lists = trakt.trakt_get_lists()
    items = []
    for list in lists:
        name = list["name"]
        user = list["user"]["username"]
        slug = list["ids"]["slug"]
        items.append({
            'label': name,
            'path': plugin.url_for("lists_trakt_show_list", user = user, slug = slug),
            'context_menu': [
                (
                    _("Scan item to library"),
                    "RunPlugin({0})".format(plugin.url_for("lists_trakt_add_all_to_library", user=user, slug=slug))
                ),
                (
                    "{0} ({1})".format(_("Play"), _("Random").lower()),
                    "RunPlugin({0})".format(plugin.url_for("lists_trakt_play_random", user=user, slug=slug))
                )
            ],
            'icon': get_icon_path("traktmylists"),
            'thumbnail': get_icon_path("traktmylists"),
        })
        fanart = plugin.addon.getAddonInfo('fanart')
        for item in items:
            item['properties'] = {'fanart_image' : get_background_path()}
    if FORCE == True: return plugin.finish(items=items, sort_methods=SORT, view_mode=VIEW)
    else: return plugin.finish(items=items, sort_methods=SORT)
开发者ID:vphuc81,项目名称:MyRepository,代码行数:28,代码来源:lists.py

示例9: player_setup

def player_setup():
    xbmc.executebuiltin("SetProperty(running,totalmetalliq,home)")
    url = "https://api.github.com/repos/OpenELEQ/verified-metalliq-players/zipball"
    if updater.update_players(url):
        plugin.notify(msg=_("Players"), title=_("Updated"), delay=1000, image=get_icon_path("player"))
    else:
        plugin.notify(msg=_("Players update"), title=_("Failed"), delay=1000, image=get_icon_path("player"))
    xbmc.executebuiltin("RunPlugin(plugin://plugin.video.metalliq/settings/players/all/)")
    xbmc.executebuiltin("ClearProperty(running,home)")
    return True
开发者ID:noobsandnerds,项目名称:noobsandnerds,代码行数:10,代码来源:addon.py

示例10: root_search

def root_search():
    """ Search directory """
    items = [
        {"label": "All", "path": plugin.url_for(root_search_term, page="1"), "icon": get_icon_path("search")},
        {
            "label": _("Movies") + ": " + _("Search (Trakt)"),
            "path": plugin.url_for("trakt_movies_search", page="1"),
            "icon": get_icon_path("movies"),
        },
        {
            "label": _("Movies") + ": " + _("Search (TMDb)"),
            "path": plugin.url_for("tmdb_movies_search", page="1"),
            "icon": get_icon_path("movies"),
        },
        {
            "label": _("TV shows") + ": " + _("Search (Trakt)"),
            "path": plugin.url_for("trakt_tv_search", page="1"),
            "icon": get_icon_path("tv"),
        },
        {
            "label": _("TV shows") + ": " + _("Search (TMDb)"),
            "path": plugin.url_for("tmdb_tv_search"),
            "icon": get_icon_path("tv"),
        },
        {
            "label": _("TV shows") + ": " + _("Search (TVDb)"),
            "path": plugin.url_for("tvdb_tv_search"),
            "icon": get_icon_path("tv"),
        },
        {
            "label": _("Music") + ": " + _("Search artist"),
            "path": plugin.url_for("music_search_artist"),
            "icon": get_icon_path("music"),
        },
        {
            "label": _("Music") + ": " + _("Search album"),
            "path": plugin.url_for("music_search_album"),
            "icon": get_icon_path("music"),
        },
        {
            "label": _("Music") + ": " + _("Search track"),
            "path": plugin.url_for("music_search_track"),
            "icon": get_icon_path("music"),
        },
        {"label": _("Live") + ": " + _("Search"), "path": plugin.url_for("live_search"), "icon": get_icon_path("live")},
        {
            "label": _("Lists") + ": " + _("Search"),
            "path": plugin.url_for("lists_trakt_search_for_lists"),
            "icon": get_icon_path("lists"),
        },
    ]
    fanart = plugin.addon.getAddonInfo("fanart")
    for item in items:
        item["properties"] = {"fanart_image": get_background_path()}
    return items
开发者ID:noobsandnerds,项目名称:noobsandnerds,代码行数:55,代码来源:addon.py

示例11: settings_set_players

def settings_set_players(media):
    playericon = get_icon_path("player")
    if media == "all":
        medias = ["movies","tvshows","live"]
        for media in medias:
            mediatype = media.replace('es','e ').replace('ws','w ').replace('all','').replace('ve','ve ')
            players = get_players(media)
            selected = [p.id for p in players]
            if selected is not None:
                if media == "movies":
                    plugin.set_setting(SETTING_MOVIES_ENABLED_PLAYERS, selected)
                elif media == "tvshows":
                    plugin.set_setting(SETTING_TV_ENABLED_PLAYERS, selected)
                elif media == "live":
                    plugin.set_setting(SETTING_LIVE_ENABLED_PLAYERS, selected)
                else:
                    raise Exception("invalid parameter %s" % media)
            plugin.notify(msg=_('All '+mediatype+'players'), title=_('Enabled'), delay=1000, image=get_icon_path("player"))
        plugin.notify(msg=_('All players'), title=_('Enabled'), delay=1000, image=get_icon_path("player"))
        return
    else:
        mediatype = media.replace('es','e ').replace('ws','w ').replace('all','').replace('ve','ve ')
        players = get_players(media)
        players = sorted(players,key=lambda player: player.clean_title.lower())
        version = xbmc.getInfoLabel('System.BuildVersion')
        if version.startswith('16') or version.startswith('17'):
            msg = "Do you want to enable all "+mediatype+"players?"
            if dialogs.yesno(_("Enable all "+mediatype+"players"), _(msg)):
                selected = [p.id for p in players]
            else:
                result = dialogs.multiselect(_("Select "+mediatype+"players to enable"), [p.clean_title for p in players])
                if result is not None:
                    selected = [players[i].id for i in result]
        else:
            selected = None
            msg = "Kodi 16 is required for multi-selection. Do you want to enable all "+mediatype+"players instead?"
            if dialogs.yesno(_("Enable all "+mediatype+"players"), _(msg)):
                selected = [p.id for p in players]
            else:
                result = dialogs.multichoice(_("Select "+mediatype+"players to enable"), [p.clean_title for p in players])
                if result is not None:
                    selected = [players[i].id for i in result]
        if selected is not None:
            if media == "movies":
                plugin.set_setting(SETTING_MOVIES_ENABLED_PLAYERS, selected)
            elif media == "tvshows":
                plugin.set_setting(SETTING_TV_ENABLED_PLAYERS, selected)
            elif media == "live":
                plugin.set_setting(SETTING_LIVE_ENABLED_PLAYERS, selected)
            else:
                raise Exception("invalid parameter %s" % media)
        plugin.notify(msg=_('All '+mediatype+'players'), title=_('Updated'), delay=1000, image=get_icon_path("player"))
开发者ID:OpenELEQ,项目名称:testing.meta.more,代码行数:52,代码来源:addon.py

示例12: trakt_my_movies

def trakt_my_movies():
    items = [
        {
            'label': "{0} ({1})".format(_("Library"), "collection"),
            'path': plugin.url_for("trakt_movies_collection"),
            'icon': get_icon_path("traktcollection"),
            'context_menu': [
                (
                    _("Scan item to library"),
                    "RunPlugin({0})".format(plugin.url_for("trakt_movies_collection_to_library"))
                ),
                (
                    "{0} ({1})".format(_("Play"), _("Random").lower()),
                    "RunPlugin({0})".format(plugin.url_for("trakt_movies_play_random_collection"))
                )
            ]
        },
        {
            'label': "{0} {1} ({2})".format(_("Unwatched"), _("movies"), "watchlist"),
            'path': plugin.url_for("trakt_movies_watchlist"),
            'icon': get_icon_path("traktwatchlist"),
            'context_menu': [
                (
                    _("Scan item to library"),
                    "RunPlugin({0})".format(plugin.url_for("trakt_movies_watchlist_to_library"))
                ),
                (
                    "{0} ({1})".format(_("Play"), _("Random").lower()),
                    "RunPlugin({0})".format(plugin.url_for("trakt_movies_play_random_watchlist"))
                )
            ]
        },
        {
            'label':"{0} ({1})".format(_("Find similar"), "recommendations"),
            'path': plugin.url_for("trakt_movies_recommendations"),
            'icon': get_icon_path("traktrecommendations"),
            'context_menu': [
                (
                    _("Scan item to library"),
                    "RunPlugin({0})".format(plugin.url_for("trakt_movies_recommendations_to_library"))
                ),
                (
                    "{0} ({1})".format(_("Play"), _("Random").lower()),
                    "RunPlugin({0})".format(plugin.url_for("trakt_movies_play_random_recommendation"))
                )
            ]
        }
    ]
    for item in items: item['properties'] = {'fanart_image' : get_background_path()}
    if FORCE == True: plugin.finish(items=items, sort_methods=SORT, view_mode=VIEW)
    else: return plugin.finish(items=items, sort_methods=SORT)
开发者ID:vphuc81,项目名称:MyRepository,代码行数:51,代码来源:movies.py

示例13: lists_search_for_lists_term

def lists_search_for_lists_term(term, page):
    lists, pages = trakt.search_for_list(term, page)
    page = int(page)
    pages = int(pages)
    items = []
    for list in lists:
        if "list" in list:
            list_info = list["list"]
        else:
            continue
        name = list_info["name"]
        user = list_info["username"]
        slug = list_info["ids"]["slug"]
        total = list_info["item_count"]

        info = {}
        info['title'] = name
        if "description" in list_info: info["plot"] = list_info["description"]
        else: info["plot"] = _("No description available")
        if user != None and total != None and total != 0:
            items.append({
                'label': "{0} - {1} ({2})".format(to_utf8(name), to_utf8(user), total),
                'path': plugin.url_for("lists_trakt_show_list", user=user, slug=slug),
                'context_menu': [
                    (
                        _("Scan item to library"),
                        "RunPlugin({0})".format(plugin.url_for("lists_trakt_add_all_to_library", user=user, slug=slug))
                    ),
                   (
                        "{0} ({1})".format(_("Play"), _("Random").lower()),
                        "RunPlugin({0})".format(plugin.url_for("lists_trakt_play_random", user=user, slug=slug))
                    )
                ],
                'info': info,
                'icon': get_icon_path("traktlikedlists"),
                'thumbnail': get_icon_path("traktlikedlists"),
            })
            fanart = plugin.addon.getAddonInfo('fanart')
            for item in items:
                item['properties'] = {'fanart_image' : get_background_path()}
    if pages > page:
        items.append({
            'label': _("Next page").format() + "  >>  (%s/%s)" % (page + 1, pages),
            'path': plugin.url_for("lists_search_for_lists_term", term = term, page=page + 1),
            'icon': get_icon_path("item_next"),
            'thumbnail': get_icon_path("item_next"),
        })
    if FORCE == True: return plugin.finish(items=items, sort_methods=SORT, view_mode=VIEW)
    else: return plugin.finish(items=items, sort_methods=SORT)
开发者ID:vphuc81,项目名称:MyRepository,代码行数:49,代码来源:lists.py

示例14: music_artist

def music_artist(name):
    name = to_utf8(name)
    items = [
        {
            "label": _("Tracks"),
            "path": plugin.url_for("music_artist_tracks", artist_name=name),
            "icon": get_icon_path("music"),
        },
        {
            "label": _("Albums"),
            "path": plugin.url_for("music_artist_albums", artist_name=name),
            "icon": get_icon_path("music"),
        },
    ]
    return items
开发者ID:noobsandnerds,项目名称:noobsandnerds,代码行数:15,代码来源:music.py

示例15: lists

def lists():
    """ Lists directory """
    items = [
        {
            'label': _("Trakt liked lists"),
            'path': plugin.url_for("lists_trakt_liked_lists"),
            'icon': get_icon_path("tv"),  # TODO
        },
        {
            'label': _("Trakt my lists"),
            'path': plugin.url_for("lists_trakt_my_lists"),
            'icon': get_icon_path("tv"),  # TODO
        }
    ]
    return items
开发者ID:OpenELEQ,项目名称:testing.meta,代码行数:15,代码来源:lists.py


注:本文中的meta.navigation.base.get_icon_path函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。