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


Python xbmcplugin.SORT_METHOD_NONE属性代码示例

本文整理汇总了Python中xbmcplugin.SORT_METHOD_NONE属性的典型用法代码示例。如果您正苦于以下问题:Python xbmcplugin.SORT_METHOD_NONE属性的具体用法?Python xbmcplugin.SORT_METHOD_NONE怎么用?Python xbmcplugin.SORT_METHOD_NONE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在xbmcplugin的用法示例。


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

示例1: addLinkItem

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def addLinkItem(name, url, mode, params=1, iconimage='DefaultFolder.png', infoLabels=False, IsPlayable=True,
                fanart=FANART, itemcount=1, contextmenu=None):
    u = build_url({'mode': mode, 'foldername': name, 'ex_link': url, 'params': params})

    liz = xbmcgui.ListItem(name)

    art_keys = ['thumb', 'poster', 'banner', 'fanart', 'clearart', 'clearlogo', 'landscape', 'icon']
    art = dict(zip(art_keys, [iconimage for x in art_keys]))
    art['landscape'] = fanart if fanart else art['landscape']
    art['fanart'] = fanart if fanart else art['landscape']
    liz.setArt(art)

    if not infoLabels:
        infoLabels = {"title": name}
    liz.setInfo(type="video", infoLabels=infoLabels)
    if IsPlayable:
        liz.setProperty('IsPlayable', 'true')

    if contextmenu:
        contextMenuItems = contextmenu
        liz.addContextMenuItems(contextMenuItems, replaceItems=True)

    ok = xbmcplugin.addDirectoryItem(handle=addon_handle, url=u, listitem=liz, isFolder=False, totalItems=itemcount)
    xbmcplugin.addSortMethod(addon_handle, sortMethod=xbmcplugin.SORT_METHOD_NONE, label2Mask="%R, %Y, %P")
    return ok 
开发者ID:bugatsinho,项目名称:bugatsinho.github.io,代码行数:27,代码来源:main.py

示例2: addDir

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def addDir(name, ex_link=None, params=1, mode='folder', iconImage='DefaultFolder.png', infoLabels=None, fanart=FANART,
           contextmenu=None):
    url = build_url({'mode': mode, 'foldername': name, 'ex_link': ex_link, 'params': params})

    nofolders = ['take_stream', 'opensettings', 'enable_input', 'forceupdate', 'open_news', 'ccache', 'showalts']
    folder = False if mode in nofolders else True

    li = xbmcgui.ListItem(name)
    if infoLabels:
        li.setInfo(type="video", infoLabels=infoLabels)
    li.setProperty('fanart_image', fanart)
    art_keys = ['thumb', 'poster', 'banner', 'fanart', 'clearart', 'clearlogo', 'landscape', 'icon']
    art = dict(zip(art_keys, [iconImage for x in art_keys]))
    art['landscape'] = fanart if fanart else art['landscape']
    art['fanart'] = fanart if fanart else art['landscape']
    li.setArt(art)

    if contextmenu:
        contextMenuItems = contextmenu
        li.addContextMenuItems(contextMenuItems, replaceItems=True)

    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=folder)
    xbmcplugin.addSortMethod(addon_handle, sortMethod=xbmcplugin.SORT_METHOD_NONE, label2Mask="%R, %Y, %P") 
开发者ID:bugatsinho,项目名称:bugatsinho.github.io,代码行数:25,代码来源:main.py

示例3: channeltypes

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def channeltypes(params,url,category):
    logger.info("channelselector.channeltypes")

    lista = getchanneltypes()
    for item in lista:
        addfolder(item.title,item.channel,item.action,category=item.category,thumbnailname=item.thumbnail)

    if config.get_platform()=="kodi-krypton" or config.get_platform()=="kodi-leia":
        import plugintools
        plugintools.set_view( plugintools.TV_SHOWS )

    # Label (top-right)...
    import xbmcplugin
    xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category="" )
    xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE )
    xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )

    if config.get_setting("forceview")=="true":
        # Confluence - Thumbnail
        import xbmc
        xbmc.executebuiltin("Container.SetViewMode(500)") 
开发者ID:tvalacarta,项目名称:tvalacarta,代码行数:23,代码来源:channelselector.py

示例4: listchannels

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def listchannels(params,url,category):
    logger.info("channelselector.listchannels")

    lista = filterchannels(category)
    for channel in lista:
        if config.is_xbmc() and (channel.type=="xbmc" or channel.type=="generic"):
            addfolder(channel.title , channel.channel , "mainlist" , channel.channel)

        elif config.get_platform()=="boxee" and channel.extra!="rtmp":
            addfolder(channel.title , channel.channel , "mainlist" , channel.channel)

    if config.get_platform()=="kodi-krypton" or config.get_platform()=="kodi-leia":
        import plugintools
        plugintools.set_view( plugintools.TV_SHOWS )

    # Label (top-right)...
    import xbmcplugin
    xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category )
    xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE )
    xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )

    if config.get_setting("forceview")=="true":
        # Confluence - Thumbnail
        import xbmc
        xbmc.executebuiltin("Container.SetViewMode(500)") 
开发者ID:tvalacarta,项目名称:tvalacarta,代码行数:27,代码来源:channelselector.py

示例5: add_sort_methods

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def add_sort_methods(sort_type):
    if sort_type == 'sort_nothing':
        xbmcplugin.addSortMethod(g.PLUGIN_HANDLE, xbmcplugin.SORT_METHOD_NONE)
    if sort_type == 'sort_label':
        xbmcplugin.addSortMethod(g.PLUGIN_HANDLE, xbmcplugin.SORT_METHOD_LABEL)
    if sort_type == 'sort_label_ignore_folders':
        xbmcplugin.addSortMethod(g.PLUGIN_HANDLE, xbmcplugin.SORT_METHOD_LABEL_IGNORE_FOLDERS)
    if sort_type == 'sort_episodes':
        xbmcplugin.addSortMethod(g.PLUGIN_HANDLE, xbmcplugin.SORT_METHOD_EPISODE)
        xbmcplugin.addSortMethod(g.PLUGIN_HANDLE, xbmcplugin.SORT_METHOD_LABEL)
        xbmcplugin.addSortMethod(g.PLUGIN_HANDLE, xbmcplugin.SORT_METHOD_VIDEO_TITLE) 
开发者ID:CastagnaIT,项目名称:plugin.video.netflix,代码行数:13,代码来源:directory_utils.py

示例6: mainlist

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def mainlist(params,url,category):
    logger.info("channelselector.mainlist")

    # Verifica actualizaciones solo en el primer nivel
    if config.get_platform()!="boxee":
        try:
            from core import updater
        except ImportError:
            logger.info("channelselector.mainlist No disponible modulo actualizaciones")
        else:
            if config.get_setting("check_for_plugin_updates") == "true":
                logger.info("channelselector.mainlist Verificar actualizaciones activado")
                updater.checkforupdates()
            else:
                logger.info("channelselector.mainlist Verificar actualizaciones desactivado")

    itemlist = getmainlist("squares")
    for elemento in itemlist:
        logger.info("channelselector item="+elemento.tostring())
        addfolder(elemento.title , elemento.channel , elemento.action , thumbnailname=elemento.thumbnail, folder=elemento.folder)

    if config.get_platform()=="kodi-krypton" or config.get_platform()=="kodi-leia":
        import plugintools
        plugintools.set_view( plugintools.TV_SHOWS )

    # Label (top-right)...
    import xbmcplugin
    #xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category="" )
    #xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE )
    xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )

    if config.get_setting("forceview")=="true":
        # Confluence - Thumbnail
        import xbmc
        xbmc.executebuiltin("Container.SetViewMode(500)") 
开发者ID:tvalacarta,项目名称:tvalacarta,代码行数:37,代码来源:channelselector.py

示例7: endofdirectory

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def endofdirectory(args):
    # sort methods are required in library mode
    xbmcplugin.addSortMethod(int(args._argv[1]), xbmcplugin.SORT_METHOD_NONE)

    # let xbmc know the script is done adding items to the list
    xbmcplugin.endOfDirectory(handle = int(args._argv[1])) 
开发者ID:MrKrabat,项目名称:plugin.video.crunchyroll,代码行数:8,代码来源:view.py

示例8: buildShowsList

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def buildShowsList(videos):
    for chan, video_url, video_title, video_icon, infoLabels, video_mode in videos:
        li = xbmcgui.ListItem(
            video_title,
            iconImage=video_icon,
            thumbnailImage=video_icon,
            path=video_url)
        url = build_url({
            'mode': video_mode,
            'channel': chan,
            'param': video_url,
            'name': video_title})
        if video_mode == 'play':
            li.setInfo( type='Video', infoLabels=infoLabels)
            li.setProperty('IsPlayable', 'true')
            li.addContextMenuItems([(globalvar.LANGUAGE(33020).encode('utf-8'), 'XBMC.RunPlugin(%s?mode=dl&channel=%s&param=%s&name=%s)' % (sys.argv[0],chan,urllib.quote_plus(video_url),urllib.quote_plus(video_title)))])
            xbmcplugin.addSortMethod(addon_handle, xbmcplugin.SORT_METHOD_NONE)
            xbmcplugin.setPluginCategory(addon_handle, 'episodes')
            xbmcplugin.setContent(addon_handle, 'episodes')
        xbmcplugin.addDirectoryItem(
            handle=addon_handle,
            url=url,
            listitem=li,
            isFolder=video_mode != 'play')
    if channel == 'favourites' and param == 'unseen':
        notify(globalvar.LANGUAGE(33026).encode('utf-8'), 0) 
开发者ID:spmjc,项目名称:plugin.video.freplay,代码行数:28,代码来源:default.py

示例9: show_menu

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def show_menu():
    if get_app_id() == '' or get_app_key() == '' or get_secret_key() == '':
        return show_credentials_needed_menu()
    listing = []
    tv_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32031)))
    tv_url = '{0}?action=categories&base=5-130'.format(_url)
    listing.append((tv_url, tv_list_item, True))
    live_tv_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32067)))
    live_tv_url = '{0}?action=live'.format(_url)
    listing.append((live_tv_url, live_tv_list_item, True))
    radio_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32032)))
    radio_url = '{0}?action=categories&base=5-200'.format(_url)
    listing.append((radio_url, radio_list_item, True))
    search_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32007)))
    search_url = '{0}?action=search'.format(_url)
    listing.append((search_url, search_list_item, True))
    favourites_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32025)))
    favourites_url = '{0}?action=favourites'.format(_url)
    listing.append((favourites_url, favourites_list_item, True))
    open_settings_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32040)))
    open_settings_url = '{0}?action=settings'.format(_url)
    listing.append((open_settings_url, open_settings_list_item, True))
    # Add our listing to Kodi.
    xbmcplugin.addDirectoryItems(_handle, listing, len(listing))
    # Add a sort method for the virtual folder items (alphabetically, ignore articles)
    xbmcplugin.addSortMethod(_handle, xbmcplugin.SORT_METHOD_NONE)
    # Finish creating a virtual folder.
    xbmcplugin.endOfDirectory(_handle) 
开发者ID:hirsivaja,项目名称:plugin.video.areena,代码行数:36,代码来源:main.py

示例10: show_credentials_needed_menu

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def show_credentials_needed_menu():
    listing = []
    missing_credentials_list_item = xbmcgui.ListItem(label=get_translation(32038))
    missing_credentials_url = '{0}'.format(_url)
    listing.append((missing_credentials_url, missing_credentials_list_item, True))
    open_settings_list_item = xbmcgui.ListItem(label=get_translation(32039))
    open_settings_url = '{0}?action=settings'.format(_url)
    listing.append((open_settings_url, open_settings_list_item, True))
    # Add our listing to Kodi.
    xbmcplugin.addDirectoryItems(_handle, listing, len(listing))
    # Add a sort method for the virtual folder items (alphabetically, ignore articles)
    xbmcplugin.addSortMethod(_handle, xbmcplugin.SORT_METHOD_NONE)
    # Finish creating a virtual folder.
    xbmcplugin.endOfDirectory(_handle) 
开发者ID:hirsivaja,项目名称:plugin.video.areena,代码行数:16,代码来源:main.py

示例11: add_items_to_kodi_directory

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def add_items_to_kodi_directory(itemlist,parent_item):
    logger.info("tvalacarta.platformcode.xbmctools add_items_to_kodi_directory")

    pluginhandle = int( sys.argv[ 1 ] )

    # Checks if channel provides context menu for items
    exec "import channels."+parent_item.channel+" as channelmodule"
    channel_provides_context_menu = hasattr(channelmodule, 'get_context_menu_for_item')

    for item in itemlist:

        # If video has no fanart, here is assigned a new one
        if item.fanart=="":
            channel_fanart = os.path.join( config.get_runtime_path(), 'resources', 'images', 'fanart', item.channel+'.jpg')

            if os.path.exists(channel_fanart):
                item.fanart = channel_fanart
            else:
                item.fanart = os.path.join(config.get_runtime_path(),"fanart.jpg")

        # Add item to kodi directory
        add_item_to_kodi_directory(item,itemlist,channel_provides_context_menu)

    # Closes the XBMC directory
    xbmcplugin.setPluginCategory( handle=pluginhandle, category=parent_item.category )
    xbmcplugin.addSortMethod( handle=pluginhandle, sortMethod=xbmcplugin.SORT_METHOD_NONE )

    # Forces the view mode
    if config.get_setting("forceview")=="true":

        import plugintools

        if parent_item.view=="list":
            plugintools.set_view( plugintools.LIST )
        elif parent_item.view=="programs":
            plugintools.set_view( plugintools.TV_SHOWS )
        elif parent_item.view=="channels" or parent_item.view=="thumbnails":

            if config.get_platform()=="kodi-krypton":
                plugintools.set_view( plugintools.TV_SHOWS )
            else:
                plugintools.set_view( plugintools.THUMBNAIL )
        elif parent_item.view=="videos":
            plugintools.set_view( plugintools.EPISODES )

    xbmcplugin.endOfDirectory( handle=pluginhandle, succeeded=True ) 
开发者ID:tvalacarta,项目名称:tvalacarta,代码行数:48,代码来源:xbmctools.py

示例12: build_season_listing

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_NONE [as 别名]
def build_season_listing(self, seasons_sorted, build_url, widget_display=False):
        """Builds the season list screen for a show

        Parameters
        ----------
        seasons_sorted : :obj:`list` of :obj:`dict` of :obj:`str`
            Sorted list of season entries

        build_url : :obj:`fn`
            Function to build the subsequent routes

        Returns
        -------
        bool
            List could be build
        """
        for season in seasons_sorted:
            li = xbmcgui.ListItem(label=season['text'])
            # add some art to the item
            li.setArt(self._generate_art_info(entry=season))
            # add list item info
            infos = self._generate_listitem_info(
                entry=season,
                li=li,
                base_info={'mediatype': 'season'})
            self._generate_context_menu_items(entry=season, li=li)
            params = {'action': 'episode_list', 'season_id': season['id']}
            if 'tvshowtitle' in infos:
                title = infos.get('tvshowtitle', '').encode('utf-8')
                params['tvshowtitle'] = base64.urlsafe_b64encode(title)
            url = build_url(params)
            xbmcplugin.addDirectoryItem(
                handle=self.plugin_handle,
                url=url,
                listitem=li,
                isFolder=True)

        xbmcplugin.addSortMethod(
            handle=self.plugin_handle,
            sortMethod=xbmcplugin.SORT_METHOD_NONE)
        xbmcplugin.addSortMethod(
            handle=self.plugin_handle,
            sortMethod=xbmcplugin.SORT_METHOD_VIDEO_YEAR)
        xbmcplugin.addSortMethod(
            handle=self.plugin_handle,
            sortMethod=xbmcplugin.SORT_METHOD_LABEL)
        xbmcplugin.addSortMethod(
            handle=self.plugin_handle,
            sortMethod=xbmcplugin.SORT_METHOD_LASTPLAYED)
        xbmcplugin.addSortMethod(
            handle=self.plugin_handle,
            sortMethod=xbmcplugin.SORT_METHOD_TITLE)
        xbmcplugin.setContent(
            handle=self.plugin_handle,
            content=CONTENT_SEASON)
        xbmcplugin.endOfDirectory(self.plugin_handle)
        if not widget_display:
            self.set_custom_view(VIEW_SEASON)
        return True 
开发者ID:asciidisco,项目名称:plugin.video.netflix,代码行数:61,代码来源:KodiHelper.py


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