Example #1
0
    def ok(self):
        if self["scan"].isDone():
            try:
                from Plugins.SystemPlugins.LCNScanner.plugin import LCNBuildHelper
                lcn = LCNBuildHelper()
                lcn.buildAfterScan()
            except Exception, e:
                print e

            if self.currentInfobar.__class__.__name__ == "InfoBar":
                selectedService = self["servicelist"].getCurrentSelection()
                if selectedService and self.currentServiceList is not None:
                    self.currentServiceList.setTvMode()
                    bouquets = self.currentServiceList.getBouquetList()
                    last_scanned_bouquet = bouquets and next(
                        (x[1]
                         for x in bouquets if x[0] == "Last Scanned"), None)
                    if last_scanned_bouquet:
                        self.currentServiceList.enterUserbouquet(
                            last_scanned_bouquet)
                        self.currentServiceList.setCurrentSelection(
                            eServiceReference(selectedService[1]))
                        service = self.currentServiceList.getCurrentSelection()
                        if not self.session.postScanService or service != self.session.postScanService:
                            self.session.postScanService = service
                            self.currentServiceList.addToHistory(service)
                        config.servicelist.lastmode.save()
                        self.currentServiceList.saveChannel(service)
                        self.doCloseRecursive()
            self.cancel()
Example #2
0
	def ok(self):
		if self["scan"].isDone():
			try:
				from Plugins.SystemPlugins.LCNScanner.plugin import LCNBuildHelper
				lcn = LCNBuildHelper()
				lcn.buildAfterScan()
			except Exception, e:
				print e

			if self.currentInfobar.__class__.__name__ == "InfoBar":
				selectedService = self["servicelist"].getCurrentSelection()
				if selectedService and self.currentServiceList is not None:
					self.currentServiceList.setTvMode()
					bouquets = self.currentServiceList.getBouquetList()
					last_scanned_bouquet = bouquets and next((x[1] for x in bouquets if x[0] == "Last Scanned"), None)
					if last_scanned_bouquet:
						self.currentServiceList.enterUserbouquet(last_scanned_bouquet)
						self.currentServiceList.setCurrentSelection(eServiceReference(selectedService[1]))
						service = self.currentServiceList.getCurrentSelection()
						if not self.session.postScanService or service != self.session.postScanService:
							self.session.postScanService = service
							self.currentServiceList.addToHistory(service)
						config.servicelist.lastmode.save()
						self.currentServiceList.saveChannel(service)
						self.doCloseRecursive()
			self.cancel()
Example #3
0
    def ok(self):
        print "ok"
        if self["scan"].isDone():
            try:
                from Plugins.SystemPlugins.LCNScanner.plugin import LCNBuildHelper
                lcn = LCNBuildHelper()
                lcn.buildAfterScan()
            except Exception, e:
                print e

            if ` self.currentInfobar `.endswith(".InfoBar'>"):
                if self.currentServiceList is not None:
                    self.currentServiceList.setTvMode()
                    bouquets = self.currentServiceList.getBouquetList()
                    for x in bouquets:
                        if x[0] == 'Last Scanned':
                            self.currentServiceList.setRoot(x[1])
                            services = eServiceCenter.getInstance().list(
                                self.currentServiceList.servicelist.getRoot())
                            channels = services and services.getContent(
                                "R", True)
                            if channels:
                                self.session.postScanService = channels[0]
                                self.currentServiceList.addToHistory(
                                    channels[0])
Example #4
0
	def ok(self):
		print "ok"
		if self["scan"].isDone():
			try:
				from Plugins.SystemPlugins.LCNScanner.plugin import LCNBuildHelper
				lcn = LCNBuildHelper()
				lcn.buildAfterScan()
			except Exception, e:
				print e
				
			self.close()
Example #5
0
	def ok(self):
		print "ok"
		if self["scan"].isDone():
			try:
				from Plugins.SystemPlugins.LCNScanner.plugin import LCNBuildHelper
				lcn = LCNBuildHelper()
				lcn.buildAfterScan()
			except Exception, e:
				print e
				
			if `self.currentInfobar`.endswith(".InfoBar'>"):
				if self.currentServiceList is not None:
					self.currentServiceList.setTvMode()
					bouquets = self.currentServiceList.getBouquetList()
					for x in bouquets:
						if x[0] == 'Last Scanned':
							self.currentServiceList.setRoot(x[1])
							services = eServiceCenter.getInstance().list(self.currentServiceList.servicelist.getRoot())
							channels = services and services.getContent("R", True)
							if channels:
								self.session.postScanService = channels[0]
								self.currentServiceList.addToHistory(channels[0])