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


Python xbmcplugin.SORT_METHOD_TITLE属性代码示例

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


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

示例1: browse_album

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def browse_album(self):
        xbmcplugin.setContent(self.addon_handle, "songs")
        album = self.sp.album(self.albumid, market=self.usercountry)
        xbmcplugin.setProperty(self.addon_handle, 'FolderName', album["name"])
        tracks = self.get_album_tracks(album)
        if album.get("album_type") == "compilation":
            self.add_track_listitems(tracks, True)
        else:
            self.add_track_listitems(tracks)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_UNSORTED)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_TRACKNUM)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_TITLE)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_VIDEO_YEAR)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_SONG_RATING)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_ARTIST)
        xbmcplugin.endOfDirectory(handle=self.addon_handle)
        if self.defaultview_songs:
            xbmc.executebuiltin('Container.SetViewMode(%s)' % self.defaultview_songs) 
开发者ID:kodi-community-addons,项目名称:plugin.audio.spotify,代码行数:20,代码来源:plugin_content.py

示例2: __init__

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def __init__(self, plugin, sortmethods=None):
        Film.__init__(self)
        self.plugin = plugin
        self.handle = plugin.addon_handle
        self.settings = Settings()
        # define sortmethod for films
        # all av. sort method and put the default sortmethod on first place to be used by UI
        allSortMethods = [
            xbmcplugin.SORT_METHOD_TITLE,
            xbmcplugin.SORT_METHOD_DATE,
            xbmcplugin.SORT_METHOD_DATEADDED,
            xbmcplugin.SORT_METHOD_SIZE,
            xbmcplugin.SORT_METHOD_DURATION
        ]
        if sortmethods is not None:
            self.sortmethods = sortmethods
        else:
            method = allSortMethods[0]
            allSortMethods[0] = allSortMethods[self.settings.filmSortMethod]
            allSortMethods[self.settings.filmSortMethod]=method
            self.sortmethods = allSortMethods

        self.showshows = False
        self.showchannels = False 
开发者ID:mediathekview,项目名称:plugin.video.mediathekview,代码行数:26,代码来源:filmui.py

示例3: mainScreen

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def mainScreen(params):
	link='http://manga24.ru/all/'
	http = GET(link)
	if http == None: return False
	beautifulSoup = BeautifulSoup(http)
	content = beautifulSoup.find('select', attrs={'id': 'manga_list'})
	cats=content.findAll('option')
	for manga in cats:
		try:
			manga.prettify()
			title=manga.string
			path=str(manga).split('"')[1]
			listitem=xbmcgui.ListItem(title,addon_icon,addon_icon)
			listitem.setProperty('IsPlayable', 'false')
			listitem.setLabel(title)
			uri = construct_request({
				'func': 'get_manga',
				'm_path':path
				})
			xbmcplugin.addDirectoryItem(hos, uri, listitem, True)
		except: pass
	#xbmcplugin.addSortMethod(hos, xbmcplugin.SORT_METHOD_LABEL)
	#xbmcplugin.addSortMethod(hos, xbmcplugin.SORT_METHOD_TITLE)
	xbmcplugin.endOfDirectory(handle=hos, succeeded=True, updateListing=False, cacheToDisc=True) 
开发者ID:seppius-xbmc-repo,项目名称:ru,代码行数:26,代码来源:default.py

示例4: artist_toptracks

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def artist_toptracks(self):
        xbmcplugin.setContent(self.addon_handle, "songs")
        xbmcplugin.setProperty(self.addon_handle, 'FolderName', self.addon.getLocalizedString(11011))
        tracks = self.sp.artist_top_tracks(self.artistid, country=self.usercountry)
        tracks = self.prepare_track_listitems(tracks=tracks["tracks"])
        self.add_track_listitems(tracks)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_UNSORTED)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_TRACKNUM)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_TITLE)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_VIDEO_YEAR)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_SONG_RATING)
        xbmcplugin.endOfDirectory(handle=self.addon_handle)
        if self.defaultview_songs:
            xbmc.executebuiltin('Container.SetViewMode(%s)' % self.defaultview_songs) 
开发者ID:kodi-community-addons,项目名称:plugin.audio.spotify,代码行数:16,代码来源:plugin_content.py

示例5: browse_savedartists

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def browse_savedartists(self):
        xbmcplugin.setContent(self.addon_handle, "artists")
        xbmcplugin.setProperty(self.addon_handle, 'FolderName', xbmc.getLocalizedString(133))
        artists = self.get_savedartists()
        self.add_artist_listitems(artists)
        xbmcplugin.addSortMethod(self.addon_handle, xbmcplugin.SORT_METHOD_TITLE)
        xbmcplugin.endOfDirectory(handle=self.addon_handle)
        if self.defaultview_artists:
            xbmc.executebuiltin('Container.SetViewMode(%s)' % self.defaultview_artists) 
开发者ID:kodi-community-addons,项目名称:plugin.audio.spotify,代码行数:11,代码来源:plugin_content.py

示例6: parse

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def parse(self, data, url = '', page = 0, filter = None):
        content = common.parseDOM(data, "div", attrs={"id": "dle-content"})
        pagenav = common.parseDOM(data, "div", attrs={"class": "bot-navigation"}) 
        
        boxes = common.parseDOM(content, "div", attrs={"class": "all_tv"})
        links = common.parseDOM(boxes, "a", ret='href')
        titles = common.parseDOM(boxes, "a", ret='title')
        if not titles:
            titles = common.parseDOM(content, "div", attrs={"class": "all_tv"}, ret='title')
        images = common.parseDOM(boxes, "img", ret='src')
        items = 0

        for i, title in enumerate(titles):
            if (not filter) or (title[:len(filter)].upper() == filter.upper()):
                items += 1

                if links[i] == "http://tivix.co/263-predlozheniya-pozhelaniya-zamechaniya-po-saytu.html":
                    continue

                image = self.url + images[i]

                uri = sys.argv[0] + '?mode=show&url=%s&name=%s&image=%s' % (links[i], title, image)
                item = xbmcgui.ListItem(title, iconImage=image, thumbnailImage=image)
                item.setInfo(type='Video', infoLabels={'title': title, 'plot': title})
                #item.setProperty('IsPlayable', 'true')
                xbmcplugin.addDirectoryItem(self.handle, uri, item, True)

        if pagenav and (not (items < 119)):
            uri = sys.argv[0] + '?mode=%s&url=%s&page=%s' % ("index", url, str(int(page) + 1))
            item = xbmcgui.ListItem('%s' % self.language(1003), iconImage=self.icon, thumbnailImage=self.icon)
            item.setInfo(type='Video', infoLabels={'title': 'ЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯ'})
            xbmcplugin.addDirectoryItem(self.handle, uri, item, True)

        xbmcplugin.addSortMethod(self.handle, xbmcplugin.SORT_METHOD_TITLE)
        xbmcplugin.setContent(self.handle, 'tvshows')
        xbmcplugin.endOfDirectory(self.handle, True) 
开发者ID:dandygithub,项目名称:kodi,代码行数:38,代码来源:default.py

示例7: getEPG

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def getEPG(self, cid = None, cname = None, image = ''):
        currname = ''
        duration = 0 
        listItems = [] 
        try:
            if cname: 
                if cid:
                    epgbody = self.epg[cid]['epg']
                    currname, duration, listItems = self.addEPGItems(epgbody, image)
            elif cid: 
                epgbody = self.epg[cid]['epg']
                currname, duration, listItems = self.addEPGItems(epgbody, image)
                xbmcplugin.addDirectoryItems(self.handle, listItems)
            else:
                for channelid in self.epg:
                    channelbody = self.epg[channelid]
                    uri = sys.argv[0] + '?mode=epg&cid=%s&image=%s' % (channelid, channelbody['image_url'])
                    item = xbmcgui.ListItem("%s" % channelbody['title'],  iconImage=channelbody['image_url'], thumbnailImage=channelbody['image_url'])
                    item.setInfo(type='Video', infoLabels={'title': channelbody['title']})
    
                    commands = []
                    uricmd = sys.argv[0] + '?mode=show&url=%s&name=%s&image=%s' % (self.url + "/" + channelid + "-" + channelbody['alt_name'] + ".html", channelbody['title'], channelbody['image_url'])
                    commands.append(('[COLOR=FF00FF00]' + self.language(1006) + '[/COLOR]', "Container.Update(%s)" % (uricmd), ))
                    item.addContextMenuItems(commands)

                    xbmcplugin.addDirectoryItem(self.handle, uri, item, True)

                xbmcplugin.addSortMethod(self.handle, xbmcplugin.SORT_METHOD_TITLE)
        except:
            pass
        if cname == None:
            xbmcplugin.setContent(self.handle, 'files')
            xbmcplugin.endOfDirectory(self.handle, True)
        return currname, duration, listItems 
开发者ID:dandygithub,项目名称:kodi,代码行数:36,代码来源:default.py

示例8: __init__

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def __init__(self, plugin, sortmethods=None):
        super(ShowUI, self).__init__()
        self.plugin = plugin
        self.handle = plugin.addon_handle
        self.sortmethods = sortmethods if sortmethods is not None else [
            xbmcplugin.SORT_METHOD_TITLE]
        self.querychannelid = 0 
开发者ID:mediathekview,项目名称:plugin.video.mediathekview,代码行数:9,代码来源:showui.py

示例9: __init__

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def __init__(self, plugin, sortmethods=None, nextdir='initial'):
        super(ChannelUI, self).__init__()
        self.plugin = plugin
        self.handle = plugin.addon_handle
        self.nextdir = nextdir
        self.sortmethods = sortmethods if sortmethods is not None else [
            xbmcplugin.SORT_METHOD_TITLE]
        self.count = 0 
开发者ID:mediathekview,项目名称:plugin.video.mediathekview,代码行数:10,代码来源:channelui.py

示例10: __init__

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def __init__(self, plugin, extendedsearch, sortmethods=None):
        self.plugin = plugin
        self.handle = plugin.addon_handle
        self.sortmethods = sortmethods if sortmethods is not None else [
            xbmcplugin.SORT_METHOD_TITLE]
        self.extendedsearch = extendedsearch
        self.recents = []
        self.datafile = os.path.join(
            self.plugin.settings.datapath,
            'recent_ext_searches.json' if extendedsearch else 'recent_std_searches.json'
        ) 
开发者ID:mediathekview,项目名称:plugin.video.mediathekview,代码行数:13,代码来源:searches.py

示例11: __init__

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def __init__(self, plugin, sortmethods=None):
        self.plugin = plugin
        self.handle = plugin.addon_handle
        self.sortmethods = sortmethods if sortmethods is not None else [
            xbmcplugin.SORT_METHOD_TITLE]
        self.channelid = 0
        self.initial = ''
        self.count = 0 
开发者ID:mediathekview,项目名称:plugin.video.mediathekview,代码行数:10,代码来源:initialui.py

示例12: get_manga

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def get_manga(params):
	link='http://manga24.ru%s'%params['m_path']
	http = GET(link)
	if http == None: return False
	#print http
	beautifulSoup = BeautifulSoup(http)
	content = beautifulSoup.find('ul', attrs={'class': 'mlist'})
	try:
		cats=content.findAll('li')
		for scene in cats:
			title= str(scene).split('"')[1].split('/')[2]
			path= scene.find('a')['href']
			listitem=xbmcgui.ListItem(title,addon_icon,addon_icon)
			listitem.setProperty('IsPlayable', 'false')
			
			uri = construct_request({
				'func': 'read_manga',
				'm_path':path
				})
			xbmcplugin.addDirectoryItem(hos, uri, listitem, True)
	except: 
		try:
			content = beautifulSoup.find('div', attrs={'class': 'item2'})
			path= content.find('a')['href']
			listitem=xbmcgui.ListItem("Читать",addon_icon,addon_icon)
			listitem.setProperty('IsPlayable', 'false')
			uri = construct_request({
				'func': 'read_manga',
				'm_path':path
				})
			xbmcplugin.addDirectoryItem(hos, uri, listitem, True)
		except: pass
	xbmcplugin.addSortMethod(hos, xbmcplugin.SORT_METHOD_LABEL)
	xbmcplugin.addSortMethod(hos, xbmcplugin.SORT_METHOD_TITLE)
	#xbmcplugin.endOfDirectory(handle=hos, succeeded=True, updateListing=False, cacheToDisc=True)
	xbmcplugin.endOfDirectory(handle=hos, succeeded=True, updateListing=False, cacheToDisc=True) 
开发者ID:seppius-xbmc-repo,项目名称:ru,代码行数:38,代码来源:default.py

示例13: vodLevel

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [as 别名]
def vodLevel():
	
	try:
		data = load_channels.getVoD(portal['mac'], portal['url'], portal['serial'], addondir);
		
	except Exception as e:
		xbmcgui.Dialog().notification(addonname, str(e), xbmcgui.NOTIFICATION_ERROR );
		return;
	
	
	data = data['vod'];
	
		
	for i in data:
		name 	= i["name"];
		cmd 	= i["cmd"];
		logo 	= i["logo"];
		
		
		if logo != '':
			logo_url = portal['url'] + logo;
		else:
			logo_url = 'DefaultVideo.png';
				
				
		url = build_url({
				'mode': 'play', 
				'cmd': cmd, 
				'tmp' : '0', 
				'title' : name.encode("utf-8"),
				'genre_name' : 'VoD',
				'logo_url' : logo_url, 
				'portal' : json.dumps(portal)
				});
			

		li = xbmcgui.ListItem(name, iconImage=logo_url, thumbnailImage=logo_url)
		li.setInfo(type='Video', infoLabels={ "Title": name })

		xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)
	
	xbmcplugin.addSortMethod(addon_handle, xbmcplugin.SORT_METHOD_UNSORTED);
	xbmcplugin.addSortMethod(addon_handle, xbmcplugin.SORT_METHOD_TITLE);
	xbmcplugin.endOfDirectory(addon_handle); 
开发者ID:esxbr,项目名称:plugin.video.stalker,代码行数:46,代码来源:addon.py

示例14: build_season_listing

# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_TITLE [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_TITLE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。