RecordTimer.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:enigma2 作者: BlackHole 项目源码 文件源码
def failureCB(self, answer):
        if answer:
            self.log(13, "ok, zapped away")
            #NavigationInstance.instance.stopUserServices()
            from Screens.ChannelSelection import ChannelSelection
            ChannelSelectionInstance = ChannelSelection.instance
            self.service_types = service_types_tv
            if ChannelSelectionInstance:
                if config.usage.multibouquet.value:
                    bqrootstr = '1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "bouquets.tv" ORDER BY bouquet'
                else:
                    bqrootstr = '%s FROM BOUQUET "userbouquet.favourites.tv" ORDER BY bouquet'% self.service_types
                rootstr = ''
                serviceHandler = eServiceCenter.getInstance()
                rootbouquet = eServiceReference(bqrootstr)
                bouquet = eServiceReference(bqrootstr)
                bouquetlist = serviceHandler.list(bouquet)
                if not bouquetlist is None:
                    while True:
                        bouquet = bouquetlist.getNext()
                        if bouquet.flags & eServiceReference.isDirectory:
                            ChannelSelectionInstance.clearPath()
                            ChannelSelectionInstance.setRoot(bouquet)
                            servicelist = serviceHandler.list(bouquet)
                            if not servicelist is None:
                                serviceIterator = servicelist.getNext()
                                while serviceIterator.valid():
                                    if self.service_ref.ref == serviceIterator:
                                        break
                                    serviceIterator = servicelist.getNext()
                                if self.service_ref.ref == serviceIterator:
                                    break
                    ChannelSelectionInstance.enterPath(rootbouquet)
                    ChannelSelectionInstance.enterPath(bouquet)
                    ChannelSelectionInstance.saveRoot()
                    ChannelSelectionInstance.saveChannel(self.service_ref.ref)
                ChannelSelectionInstance.addToHistory(self.service_ref.ref)
            NavigationInstance.instance.playService(self.service_ref.ref)
            if not self.first_try_prepare and self.InfoBarInstance and hasattr(self.InfoBarInstance.session, 'pipshown') and self.InfoBarInstance.session.pipshown:
                hasattr(self.InfoBarInstance, "showPiP") and self.InfoBarInstance.showPiP()
                if hasattr(self.InfoBarInstance.session, 'pip'):
                    del self.InfoBarInstance.session.pip
                    self.InfoBarInstance.session.pipshown = False
        else:
            self.log(14, "user didn't want to zap away, record will probably fail")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号