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


Python ChannelList.fillMusicInfo方法代码示例

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


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

示例1: ConfigWindow

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

#.........这里部分代码省略.........

    def prepareConfig(self):
        self.log("prepareConfig")
        self.showList = []
        self.getControl(105).setVisible(False)
        self.getControl(106).setVisible(False)
        ### TV TIME ###
        #self.dlg = xbmcgui.DialogProgress()
        #self.dlg.create("PseudoTV", "Preparing Configuration")
        #self.dlg.update(1)
        #chnlst = ChannelList()
        #chnlst.fillTVInfo()
        #self.dlg.update(40)
        #chnlst.fillMovieInfo()
        #self.dlg.update(80)
        #self.mixedGenreList = chnlst.makeMixedList(chnlst.showGenreList, chnlst.movieGenreList)
        #self.networkList = chnlst.networkList
        #self.studioList = chnlst.studioList
        #self.showGenreList = chnlst.showGenreList
        #self.movieGenreList = chnlst.movieGenreList
        self.dlg = xbmcgui.DialogProgress()
        self.dlg.create("TV Time", "Preparing Channel Wizard")
        self.dlg.update(0, "Preparing Channel Wizard")
        self.chnlst = ChannelList()
        self.dlg.update(10, "Preparing Channel Wizard", "Loading TV Settings")
        self.chnlst.fillTVInfo()
        self.networkList = self.chnlst.networkList
        self.studioList = self.chnlst.studioList
        self.showGenreList = self.chnlst.showGenreList
        self.dlg.update(20, "Preparing Channel Wizard", "Loading Movie Settings")
        self.chnlst.fillMovieInfo()
        self.movieGenreList = self.chnlst.movieGenreList
        self.dlg.update(40, "Preparing Channel Wizard", "Loading Music Settings")
        self.chnlst.fillMusicInfo()
        self.musicGenreList = self.chnlst.musicGenreList        
        self.dlg.update(60, "Preparing Channel Wizard", "Loading Live Feed Settings")
        self.chnlst.fillFeedInfo()
        self.feedList = self.chnlst.feedList
        self.dlg.update(80, "Preparing Channel Wizard", "Loading Mixed Genre Settings")
        self.mixedGenreList = self.chnlst.makeMixedList(self.showGenreList, self.movieGenreList)        
        ###############

        for i in range(len(self.chnlst.showList)):
            self.showList.append(self.chnlst.showList[i][0])

        self.mixedGenreList.sort(key=lambda x: x.lower())
        self.listcontrol = self.getControl(102)

        for i in range(200):
            theitem = xbmcgui.ListItem()
            theitem.setLabel(str(i + 1))
            self.listcontrol.addItem(theitem)

        ### TV TIME ###
        self.resolutionList = []
        self.resolutionList.append('All')
        self.resolutionList.append('SD Only')
        self.resolutionList.append('720p or Higher')
        self.resolutionList.append('1080p Only')

        self.showseqList = []
        self.showseqList.append('1 Show')
        self.showseqList.append('2 Shows')
        self.showseqList.append('3 Shows')
        self.showseqList.append('4 Shows')
        self.showseqList.append('5 Shows')
开发者ID:PseudoTV,项目名称:PseudoTV_Archive,代码行数:70,代码来源:config.py

示例2: __init__

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

#.........这里部分代码省略.........
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_changed", "true")
                self.myOverlay.setBackgroundStatus("Initializing: Autotuning adding Recent TV",string2=' ')
                channelNum = self.chkChannelNum(channelNum)
                Movieflename = self.chanlist.createRecentlyAddedMovies()     
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_type", "0")
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_time", "0")
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_1", Movieflename)
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_rulecount", "2")
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_rule_1_id", "1")
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_rule_1_opt_1", "Recent Movies")  
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_rule_2_id", "13")
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_rule_2_opt_1", "4")  
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_changed", "true")
                self.myOverlay.setBackgroundStatus("Initializing: Autotuning adding Recent Movies",string2=' ')
               
            #3D movies
             
            if REAL_SETTINGS.getSetting("autoFind3DMovies") == "true":
                self.log("autoTune, adding 3D Movies")
                channelNum = baseNum
                if len(self.chanlist.movie3Dlist) >= MEDIA_LIMIT:
                    channelNum = self.chkChannelNum(channelNum)
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_type", "")
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_time", "0")
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_1", "")
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_2", "0")
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_changed", "true")
                    self.myOverlay.setBackgroundStatus("Initializing: Autotuning adding 3D Movies",string2=' ')
                    
            #Music Genre
            if REAL_SETTINGS.getSetting("autoFindMusicGenres") == "true":
                self.log("autoTune, adding Music Genres")
                channelNum = baseNum
                self.chanlist.fillMusicInfo()
                for i in range(len(self.chanlist.musicGenreList)):
                    channelNum = self.chkChannelNum(channelNum)
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_type", "12")
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_time", "0")
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_1", uni(self.chanlist.musicGenreList[i]))
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_2", "4")
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_changed", "true")
                    self.myOverlay.setBackgroundStatus("Initializing: Autotuning adding Music Genres",string2=uni(self.chanlist.musicGenreList[i]),progress=int(channelNum*100//CHANNEL_LIMIT))
            
            #Local Directory
            if REAL_SETTINGS.getSetting("autoFindVideosLocal") != "":
                self.log("autoTune, adding Local Videos")
                channelNum = baseNum 
                channelNum = self.chkChannelNum(channelNum)
                LocalVideo = str(REAL_SETTINGS.getSetting('autoFindVideosLocal'))  
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_type", "7")
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_time", "0")
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_1", "" +LocalVideo+ "")
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_3", str(MEDIA_LIMIT))
                ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_4", "1")     
                self.myOverlay.setBackgroundStatus("Initializing: Autotuning adding Local Directory",string2=self.chanlist.getChannelName(7, channelNum, LocalVideo))

            #Youtube - PseudoNetwork
            if REAL_SETTINGS.getSetting("autoFindCommunity_PseudoNetworks") == "true" and isCompanionInstalled() == True:
                self.log("autoTune, adding PseudoNetworks")
                channelNum = baseNum
                detail = uni(self.chanlist.requestList('plugin://plugin.video.pseudo.companion/?mode=3000&name=PseudoNetworks&previous=getOnlineMedia&url'))
                show_busy_dialog()
                for i in detail:
                    files = re.search('"file" *: *"(.*?)",', i)
                    filetypes = re.search('"filetype" *: *"(.*?)",', i)
                    labels = re.search('"label" *: *"(.*?)",', i)
开发者ID:PseudoTV,项目名称:PseudoTV_Live,代码行数:70,代码来源:Migrate.py

示例3: ChannelConfig

# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import fillMusicInfo [as 别名]
class ChannelConfig(xbmcgui.WindowXMLDialog):
    def __init__(self, *args, **kwargs):
        self.log("__init__")
        xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
        self.setCoordinateResolution(1)
        self.showingList = True
        self.channel = 0
        self.channel_type = 9999
        self.setting1 = ""
        self.setting2 = ""
        self.setting3 = ""
        self.setting4 = ""
        self.setting5 = ""
        self.setting6 = ""
        self.setting7 = ""
        self.setting8 = ""
        self.setting9 = ""
        self.doModal()
        self.log("__init__ return")

    def onInit(self):
        self.log("onInit")

        self.createDirectories()

        self.getControl(105).setVisible(False)  # Channel Listing Control Group
        self.getControl(106).setVisible(False)  # Channel Settings Control Group

        for i in range(NUMBER_CHANNEL_TYPES):
            self.getControl(120 + i).setVisible(False)  # Channel Settings

        # migrate()
        self.prepareConfig()
        self.log("onInit return")

    def onFocus(self, controlId):
        pass

    def onAction(self, act):
        action = act.getId()

        if action == ACTION_PREVIOUS_MENU:
            if self.showingList == False:
                self.cancelChan()
                self.hideChanDetails()
            else:
                self.close()

    def prepareConfig(self):
        self.log("prepareConfig")
        self.showList = []
        self.getControl(105).setVisible(False)
        self.getControl(106).setVisible(False)
        self.dlg = xbmcgui.DialogProgress()
        self.dlg.create("TV Time", "Preparing Channel Wizard")
        self.dlg.update(0, "Preparing Channel Wizard")
        self.chnlst = ChannelList()
        self.dlg.update(10, "Preparing Channel Wizard", "Loading TV Settings")
        self.chnlst.fillTVInfo()
        self.networkList = self.chnlst.networkList
        self.studioList = self.chnlst.studioList
        self.showGenreList = self.chnlst.showGenreList
        self.dlg.update(20, "Preparing Channel Wizard", "Loading Movie Settings")
        self.chnlst.fillMovieInfo()
        self.movieGenreList = self.chnlst.movieGenreList
        self.dlg.update(40, "Preparing Channel Wizard", "Loading Music Settings")
        self.chnlst.fillMusicInfo()
        self.musicGenreList = self.chnlst.musicGenreList
        self.dlg.update(60, "Preparing Channel Wizard", "Loading Live Feed Settings")
        self.chnlst.fillFeedInfo()
        self.feedList = self.chnlst.feedList
        self.dlg.update(80, "Preparing Channel Wizard", "Loading Mixed Genre Settings")
        self.mixedGenreList = self.chnlst.makeMixedList(self.showGenreList, self.movieGenreList)

        for i in range(len(self.chnlst.showList)):
            self.showList.append(self.chnlst.showList[i][0])

        self.mixedGenreList.sort(key=lambda x: x.lower())

        self.log("self.networkList " + str(self.networkList))
        self.log("self.studioList " + str(self.studioList))
        self.log("self.showGenreList " + str(self.showGenreList))
        self.log("self.movieGenreList " + str(self.movieGenreList))
        self.log("self.musicGenreList " + str(self.musicGenreList))
        self.log("self.mixedGenreList " + str(self.mixedGenreList))

        self.resolutionList = []
        self.resolutionList.append("All")
        self.resolutionList.append("SD Only")
        self.resolutionList.append("720p or Higher")
        self.resolutionList.append("1080p Only")

        self.showseqList = []
        self.showseqList.append("1 Show")
        self.showseqList.append("2 Shows")
        self.showseqList.append("3 Shows")
        self.showseqList.append("4 Shows")
        self.showseqList.append("5 Shows")
        self.showseqList.append("6 Shows")
        self.showseqList.append("7 Shows")
#.........这里部分代码省略.........
开发者ID:jtucker1972,项目名称:XBMC-TVTime,代码行数:103,代码来源:ChannelConfig.py


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