Beispiel #1
0
	def cleanUp(self):
		config.plugins.epgrefresh.lastscan.value = int(time())
		config.plugins.epgrefresh.lastscan.save()

		# Eventually force autotimer to parse epg
		if config.plugins.epgrefresh.parse_autotimer.value:
			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()

				# Parse EPG
				autotimer.parseEPG()
			except Exception as e:
				print("[EPGRefresh] Could not start AutoTimer:", e)
			finally:
				# Remove instance if there wasn't one before
				if removeInstance:
					autotimer = None
		self.finish()
Beispiel #2
0
 def query(self):
     print "[Timezones] AutoTimer poll running"
     self.stopATupdate()
     try:
         from Plugins.Extensions.AutoTimer.plugin import autotimer, autopoller
         self.autopoller = autopoller
         self.autotimer = autotimer
         if autotimer is not None:
             print "[Timezones] AutoTimer parseEPG"
             autotimer.parseEPG(autoPoll=True)
         if autopoller is not None:
             autopoller.start()
     except ImportError, KeyError:
         pass
Beispiel #3
0
	def query(self):
		print "[Timezones] AutoTimer poll running"
		self.stopATupdate()
		try:
			from Plugins.Extensions.AutoTimer.plugin import autotimer, autopoller
			self.autopoller = autopoller
			self.autotimer = autotimer
			if autotimer is not None:
				print "[Timezones] AutoTimer parseEPG"
				autotimer.parseEPG(autoPoll=True)
			if autopoller is not None:
				autopoller.start()
		except ImportError, KeyError:
			pass
    def cleanUp(self):
        config.plugins.epgrefresh.lastscan.value = int(time())
        config.plugins.epgrefresh.lastscan.save()

        # Eventually force autotimer to parse epg
        if config.plugins.epgrefresh.parse_autotimer.value:
            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()

                    # Parse EPG
                autotimer.parseEPG()
            except Exception as e:
                print("[EPGRefresh] Could not start AutoTimer:", e)
            finally:
                # Remove instance if there wasn't one before
                if removeInstance:
                    autotimer = None

                    # shutdown if we're supposed to go to deepstandby and not recording
        if not self.forcedScan and config.plugins.epgrefresh.afterevent.value and not Screens.Standby.inTryQuitMainloop:

            self.session.open(Screens.Standby.TryQuitMainloop, 1)

        if (
            not Screens.Standby.inStandby
            and not config.plugins.epgrefresh.background
            and config.plugins.epgrefresh.enablemessage.value
        ):
            Notifications.AddPopup(_("EPG refresh finished."), MessageBox.TYPE_INFO, 4, NOTIFICATIONID)
        self.forcedScan = False
        epgrefreshtimer.cleanup()
        self.maybeStopAdapter()
Beispiel #5
0
    def cleanUp(self):
        config.plugins.epgrefresh.lastscan.value = int(time())
        config.plugins.epgrefresh.lastscan.save()

        # Eventually force autotimer to parse epg
        if config.plugins.epgrefresh.parse_autotimer.value:
            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()

                # Parse EPG
                autotimer.parseEPG()
            except Exception as e:
                print("[EPGRefresh] Could not start AutoTimer:", e)
            finally:
                # Remove instance if there wasn't one before
                if removeInstance:
                    autotimer = None

        # shutdown if we're supposed to go to deepstandby and not recording
        if not self.forcedScan and config.plugins.epgrefresh.afterevent.value \
         and not Screens.Standby.inTryQuitMainloop:

            self.session.open(Screens.Standby.TryQuitMainloop, 1)

        if not Screens.Standby.inStandby and not config.plugins.epgrefresh.background and config.plugins.epgrefresh.enablemessage.value:
            Notifications.AddNotification(MessageBox,
                                          _("EPG refresh finished."),
                                          type=MessageBox.TYPE_INFO,
                                          timeout=4)
        self.forcedScan = False
        epgrefreshtimer.cleanup()
        self.maybeStopAdapter()