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


Python ChannelList.requestList方法代码示例

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


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

示例1: APP

# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import requestList [as 别名]

#.........这里部分代码省略.........
                    infoList['tagline']       = 'tagline'
                    infoList['dateadded']     = 'dateadded'
                    infoList['premiered']     = 'premiered'
                    infoList['aired']         = 'aired'
                    infoList['code']          = 'code'
                    infoList['lastplayed']    = 'lastplayed'
                    # infoList['album']         = 'album'
                    # infoList['artist']        = ['artist']
                    # infoList['votes']         = 'votes'
                    infoList['duration']      = 1
                    infoList['year']          = 1977
                    infoList['season']        = 3
                    infoList['episode']       = 4
                    infoList['playcount']     = 5
                    self.Items.setInfo('Video', infoList)    

                    infoArt = {}
                    infoArt['thumb']        = thumbnail
                    infoArt['poster']       = thumbnail
                    infoArt['banner']       = ''
                    infoArt['fanart']       = fanart
                    infoArt['clearart']     = ''
                    infoArt['clearlogo']    = ''
                    infoArt['landscape']    = fanart
                    infoList['icon']        = thumbnail
                    self.Items.setArt(infoArt) 
                    self.PanelPlugins.addItem(self.Items) 
    

    def fillListItems(self, url, type='video', file_type=False):
        self.log('fillListItems')
        self.Items = []
        if not file_type:
            detail = uni(self.chanlist.requestList(url, type))
        else:
            detail = uni(self.chanlist.requestItem(url, type))
        for f in detail:
            files = re.search('"file" *: *"(.*?)",', f)
            filetypes = re.search('"filetype" *: *"(.*?)",', f)
            labels = re.search('"label" *: *"(.*?)",', f)
            thumbnails = re.search('"thumbnail" *: *"(.*?)",', f)
            fanarts = re.search('"fanart" *: *"(.*?)",', f)
            descriptions = re.search('"description" *: *"(.*?)",', f)
            
            if filetypes and labels and files:
                filetype = filetypes.group(1)
                name = self.chanlist.cleanLabels(labels.group(1))
                file = (files.group(1).replace("\\\\", "\\"))
                
                if not descriptions:
                    description = ''
                else:
                    description = self.chanlist.cleanLabels(descriptions.group(1))
                
                if thumbnails != None and len(thumbnails.group(1)) > 0:
                    thumbnail = thumbnails.group(1)
                else:
                    thumbnail = THUMB
                    
                if fanarts != None and len(fanarts.group(1)) > 0:
                    fanart = fanarts.group(1)
                else:
                    fanart = FANART
                    
                self.Items = xbmcgui.ListItem(label=name, thumbnailImage = thumbnail)
                
开发者ID:popookitty,项目名称:PseudoTV_Live,代码行数:69,代码来源:APP.py

示例2: __init__

# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import requestList [as 别名]

#.........这里部分代码省略.........
                        self.myOverlay.setBackgroundStatus("Initializing: Autotuning adding USTVnow channels",string2=CHname,progress=int(channelNum*100//CHANNEL_LIMIT))
                    except:
                        pass

            # Custom Playlists
            if REAL_SETTINGS.getSetting("autoFindCustom") == "true":
                self.log("autoTune, adding Custom SmartPlaylists")
                channelNum = baseNum
                Music_path = 'special://profile/playlists/music'
                Mixed_path = 'special://profile/playlists/mixed'
                Video_path = 'special://profile/playlists/video'
                xsp_path = [Music_path, Mixed_path, Video_path]
                i = 0
                for path in xsp_path:
                    xspLst = self.chanlist.walk(path,['.xsp'])
                    for xsp in xspLst:
                        if xsp.endswith('.xsp') and len(re.findall("channel_",xsp)) != 0:
                            i += 1
                            if REAL_SETTINGS.getSetting("respectChannels") == "true":
                                channelNum = self.chkChannelNum(int((re.findall("channel_(\d+)", xsp))[0]))
                            else:
                                channelNum = self.chkChannelNum(channelNum)
                            ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_type", "0")
                            ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_time", "0")
                            ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_1", xbmc.translatePath(xsp))
                            ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_changed", "true")
                            self.myOverlay.setBackgroundStatus("Initializing: Autotuning adding Custom SmartPlaylists",string2=uni(self.chanlist.getSmartPlaylistName(xsp)),progress=int(channelNum*100//CHANNEL_LIMIT))

            # Custom SuperFavs
            
            if REAL_SETTINGS.getSetting("autoFindSuperFav") == "true" :
                self.log("autoTune, adding Super Favourites")
                channelNum = baseNum
                plugin_details = self.chanlist.requestList('plugin://plugin.program.super.favourites')
                
                for i in plugin_details:
                    include = False
                    
                    try:
                        filetypes = re.search('"filetype" *: *"(.*?)"', i)
                        labels = re.search('"label" *: *"(.*?)"', i)
                        files = re.search('"file" *: *"(.*?)"', i)

                        #if core variables have info proceed
                        if filetypes and files and labels:
                            filetype = filetypes.group(1)
                            file = (files.group(1))
                            label = (labels.group(1))
                            
                            if label.lower() not in SF_FILTER:
                                if filetype == 'directory':
                                    if label.lower() in ['pseudotv']:
                                        plugin_details = self.chanlist.requestList(file)
                                        include = True
                                    
                                    elif label.lower().startswith('channel'):
                                        plugin_details = self.chanlist.requestList(file)
                                        include = True

                                    if include == True:
                                        channelNum = self.chkChannelNum(channelNum)         
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_type", "15")
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_time", "0")
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_1", file)
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_2", "")
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_3", str(MEDIA_LIMIT))
开发者ID:PseudoTV,项目名称:PseudoTV_Live,代码行数:70,代码来源:Migrate.py


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