コード例 #1
0
ファイル: EPGSearch.py プロジェクト: tzyy1970/enigma2-plugins
    def importFromAutoTimer(self):
        removeInstance = False
        try:
            # Import Instance
            from Plugins.Extensions.AutoTimer.plugin import autotimer

            if autotimer is None:
                removeInstance = True
                # Create an instance
                from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer
                autotimer = AutoTimer()

            # Read in configuration
            autotimer.readXml()
        except Exception as e:
            self.session.open(MessageBox,
                              _("Could not read AutoTimer timer list: %s") % e,
                              type=MessageBox.TYPE_ERROR)
        else:
            # Fetch match strings
            # XXX: we could use the timer title as description
            options = [(x.match, x.match) for x in autotimer.getTimerList()]

            self.session.openWithCallback(self.searchEPGWrapper,
                                          ChoiceBox,
                                          title=_("Select text to search for"),
                                          list=options)
        finally:
            # Remove instance if there wasn't one before
            if removeInstance:
                autotimer = None
コード例 #2
0
	def importFromAutoTimer(self):
		removeInstance = False
		try:
			# Import Instance
			from Plugins.Extensions.AutoTimer.plugin import autotimer

			if autotimer is None:
				removeInstance = True
				# Create an instance
				from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer
				autotimer = AutoTimer()

			# Read in configuration
			autotimer.readXml()
		except Exception as e:
			self.session.open(
				MessageBox,
				_("Could not read AutoTimer timer list: %s") % e,
				type = MessageBox.TYPE_ERROR
			)
		else:
			# Fetch match strings
			# XXX: we could use the timer title as description
			options = [(x.match, x.match) for x in autotimer.getTimerList()]

			self.session.openWithCallback(
				self.searchEPGWrapper,
				ChoiceBox,
				title = _("Select text to search for"),
				list = options
			)
		finally:
			# Remove instance if there wasn't one before
			if removeInstance:
				autotimer = None
コード例 #3
0
ファイル: AT.py プロジェクト: 13K-OMAR/enigma2-plugins-sh4
	def timerList(self):
		print "timerList"

		try:
			from Plugins.Extensions.AutoTimer.plugin import autotimer

			if not autotimer:
				from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer
				autotimer = AutoTimer()
		except ImportError:
			return []

		returnList = []

		for timer in autotimer.getTimerList():
			print "TIMER: ", timer
			innerList = [
				timer.getName(),
				timer.getMatch()
			]

			if timer.hasAfterEvent():
				innerList.append(timer.getAfterEvent()) # 2
			else:
				innerList.append("") # 2

			#excludes
			innerList.extend((
				timer.getExcludedTitle(),
				timer.getExcludedShort(),
				timer.getExcludedDescription(),
				timer.getExcludedDays(),
												))

			#includes
			innerList.extend((
				timer.getIncludedTitle(),
				timer.getIncludedShort(),
				timer.getIncludedDescription(),
				timer.getIncludedDays(),
												))

			# services
			innerList.extend((
				timer.getServices(), # 11
				timer.getBouquets() # 12
												))

			if timer.hasTimespan():
				innerList.extend((
					timer.getTimespanBegin(), # 13
					timer.getTimespanEnd() # 14
												))
			else:
				innerList.extend(("", "")) # 13, 14

			if timer.hasDuration():
				innerList.append(timer.getDuration()) # 15
			else:
				innerList.append("") # 15

			if timer.hasCounter():
				innerList.extend((
					timer.getCounter(), # 16
					timer.getCounterLeft() # 17
												))
			else:
				innerList.extend((0, 0)) # 16, 17

			innerList.append(timer.getCounterLimit()) # 18

			if timer.hasDestination():
				innerList.append(timer.destination) # 19
			else:
				innerList.append(resolveFilename(SCOPE_HDD)) # 19

			if timer.hasCounterFormatString():
				innerList.append(timer.getCounterFormatString()) # 20
			else:
				innerList.append("") # 20

			innerList.extend((
				timer.getLastBegin(), # 21
				timer.getJustplay(), # 22
				timer.getAvoidDuplicateDescription() # 23
												))

			if timer.hasTags():
				innerList.append(timer.getTags()) # 24
			else:
				innerList.append("") # 24

			print "Enabled", timer.getEnabled()
			innerList.append(timer.getEnabled()) # 25
			innerList.append("off") # 26

			returnList.append(innerList)

		return returnList
コード例 #4
0
ファイル: AT.py プロジェクト: SimonCapewell/enigma2-plugins
    def timerList(self):
        print("timerList")

        try:
            from Plugins.Extensions.AutoTimer.plugin import autotimer

            if not autotimer:
                from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer
                autotimer = AutoTimer()
        except ImportError:
            return []

        returnList = []

        for timer in autotimer.getTimerList():
            print("TIMER: ", timer)
            innerList = [timer.getName(), timer.getMatch()]

            if timer.hasAfterEvent():
                innerList.append(timer.getAfterEvent())  # 2
            else:
                innerList.append("")  # 2

            #excludes
            innerList.extend((
                timer.getExcludedTitle(),
                timer.getExcludedShort(),
                timer.getExcludedDescription(),
                timer.getExcludedDays(),
            ))

            #includes
            innerList.extend((
                timer.getIncludedTitle(),
                timer.getIncludedShort(),
                timer.getIncludedDescription(),
                timer.getIncludedDays(),
            ))

            # services
            innerList.extend((
                timer.getServices(),  # 11
                timer.getBouquets()  # 12
            ))

            if timer.hasTimespan():
                innerList.extend((
                    timer.getTimespanBegin(),  # 13
                    timer.getTimespanEnd()  # 14
                ))
            else:
                innerList.extend(("", ""))  # 13, 14

            if timer.hasDuration():
                innerList.append(timer.getDuration())  # 15
            else:
                innerList.append("")  # 15

            if timer.hasCounter():
                innerList.extend((
                    timer.getCounter(),  # 16
                    timer.getCounterLeft()  # 17
                ))
            else:
                innerList.extend((0, 0))  # 16, 17

            innerList.append(timer.getCounterLimit())  # 18

            if timer.hasDestination():
                innerList.append(timer.destination)  # 19
            else:
                innerList.append(resolveFilename(SCOPE_HDD))  # 19

            if timer.hasCounterFormatString():
                innerList.append(timer.getCounterFormatString())  # 20
            else:
                innerList.append("")  # 20

            innerList.extend((
                timer.getLastBegin(),  # 21
                timer.getJustplay(),  # 22
                timer.getAvoidDuplicateDescription()  # 23
            ))

            if timer.hasTags():
                innerList.append(timer.getTags())  # 24
            else:
                innerList.append("")  # 24

            print("Enabled", timer.getEnabled())
            innerList.append(timer.getEnabled())  # 25
            innerList.append("off")  # 26

            returnList.append(innerList)

        return returnList
コード例 #5
0
            if autotimer is None:
                removeInstance = True
                # Create an instance
                from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer

                autotimer = AutoTimer()

                # Read in configuration
            autotimer.readXml()
        except Exception, e:
            self.session.open(MessageBox, _("Could not read AutoTimer timer list: %s") % e, type=MessageBox.TYPE_ERROR)
        else:
            # Fetch match strings
            # XXX: we could use the timer title as description
            options = [(x.match, x.match) for x in autotimer.getTimerList()]

            self.session.openWithCallback(
                self.searchEPGWrapper, ChoiceBox, title=_("Select text to search for"), list=options
            )
        finally:
            # Remove instance if there wasn't one before
            if removeInstance:
                autotimer = None

    def addAutoTimer(self):
        addAutotimerFromSearchString(self.session, self.currSearch)

    def exportAutoTimer(self):
        cur = self["list"].getCurrent()
        if cur is None:
コード例 #6
0
ファイル: EPGSearch.py プロジェクト: grantor/enigma2-plugins
            if autotimer is None:
                removeInstance = True
                # Create an instance
                from Plugins.Extensions.AutoTimer.AutoTimer import AutoTimer
                autotimer = AutoTimer()

            # Read in configuration
            autotimer.readXml()
        except Exception, e:
            self.session.open(MessageBox,
                              _("Could not read AutoTimer timer list: %s") % e,
                              type=MessageBox.TYPE_ERROR)
        else:
            # Fetch match strings
            # XXX: we could use the timer title as description
            options = [(x.match, x.match) for x in autotimer.getTimerList()]

            self.session.openWithCallback(self.searchEPGWrapper,
                                          ChoiceBox,
                                          title=_("Select text to search for"),
                                          list=options)
        finally:
            # Remove instance if there wasn't one before
            if removeInstance:
                autotimer = None

    def addAutoTimer(self):
        addAutotimerFromSearchString(self.session, self.currSearch)

    def exportAutoTimer(self):
        cur = self['list'].getCurrent()