Ejemplo n.º 1
0
    def refresh(self):
        if self.forcedScan:
            self.nextService()
        else:
            # Abort if a scan finished later than our begin of timespan
            if self.beginOfTimespan < config.plugins.epgrefresh.lastscan.value:
                return
            if config.plugins.epgrefresh.force.value \
             or (Screens.Standby.inStandby and \
              not self.session.nav.RecordTimer.isRecording()):

                self.nextService()
            # We don't follow our rules here - If the Box is still in Standby and not recording we won't reach this line
            else:
                if not checkTimespan(config.plugins.epgrefresh.begin.value,
                                     config.plugins.epgrefresh.end.value):

                    print(
                        "[EPGRefresh] Gone out of timespan while refreshing, sorry!"
                    )
                    self.cleanUp()
                else:
                    print(
                        "[EPGRefresh] Box no longer in Standby or Recording started, rescheduling"
                    )

                    # Recheck later
                    epgrefreshtimer.add(
                        EPGRefreshTimerEntry(
                            time() +
                            config.plugins.epgrefresh.delay_standby.value * 60,
                            self.refresh,
                            nocheck=True))
Ejemplo n.º 2
0
	def refresh(self):
		if self.doStopRunningRefresh:
			self.cleanUp()
			return
		
		if self.forcedScan:
			self.nextService()
		else:
			# Abort if a scan finished later than our begin of timespan
			if self.beginOfTimespan < config.plugins.epgrefresh.lastscan.value:
				return
			if config.plugins.epgrefresh.force.value \
				or (Screens.Standby.inStandby and \
					not self.session.nav.RecordTimer.isRecording()):

				self.nextService()
			# We don't follow our rules here - If the Box is still in Standby and not recording we won't reach this line
			else:
				if not checkTimespan(
					config.plugins.epgrefresh.begin.value,
					config.plugins.epgrefresh.end.value):

					print("[EPGRefresh] Gone out of timespan while refreshing, sorry!")
					self.cleanUp()
				else:
					print("[EPGRefresh] Box no longer in Standby or Recording started, rescheduling")

					# Recheck later
					epgrefreshtimer.add(EPGRefreshTimerEntry(
							time() + config.plugins.epgrefresh.delay_standby.value*60,
							self.refresh,
							nocheck = True)
					)
Ejemplo n.º 3
0
    def refresh(self):
        if self.wait.isActive():
            self.wait.stop()
        if self.forcedScan:
            self.nextService()
        else:
            if self.beginOfTimespan < config.plugins.epgrefresh.lastscan.value:
                if not self.wait.isActive():
                    self.isrunning = False
                return
            check_standby = False
            stop_service = False
            if Screens.Standby.inStandby:
                check_standby = True
            if not config.plugins.epgrefresh.force.value and check_standby:
                rec_time = self.session.nav.RecordTimer.getNextRecordingTime()
                interval = config.plugins.epgrefresh.interval_seconds.value
                if interval <= 20:
                    interval = 25
                if rec_time > 0 and (rec_time - time()) <= interval:
                    stop_service = True
            if config.plugins.epgrefresh.force.value or (
                    check_standby
                    and not self.session.nav.RecordTimer.isRecording()
                    and not stop_service):
                self.nextService()
            else:
                if not checkTimespan(config.plugins.epgrefresh.begin.value,
                                     config.plugins.epgrefresh.end.value):

                    print(
                        "[EPGRefresh] Gone out of timespan while refreshing, sorry!"
                    )
                    self.cleanUp()
                else:
                    print(
                        "[EPGRefresh] Box no longer in Standby or Recording started, rescheduling"
                    )
                    if check_standby and config.plugins.epgrefresh.adapter.value == "main":
                        self.session.nav.stopService()
                    epgrefreshtimer.add(
                        EPGRefreshTimerEntry(
                            time() +
                            config.plugins.epgrefresh.delay_standby.value * 60,
                            self.refresh,
                            nocheck=True))
Ejemplo n.º 4
0
	def refresh(self):
		if self.wait.isActive():
			self.wait.stop()
		if self.forcedScan:
			self.nextService()
		else:
			if self.beginOfTimespan < config.plugins.epgrefresh.lastscan.value:
				if not self.wait.isActive():
					self.isrunning = False
				return
			check_standby = False
			stop_service = False
			if Screens.Standby.inStandby:
				check_standby = True
			if not config.plugins.epgrefresh.force.value and check_standby:
				rec_time = self.session.nav.RecordTimer.getNextRecordingTime()
				interval = config.plugins.epgrefresh.interval_seconds.value
				if interval <= 20:
					interval = 25
				if rec_time > 0 and (rec_time - time()) <= interval:
					stop_service = True
			if config.plugins.epgrefresh.force.value or (check_standby and not self.session.nav.RecordTimer.isRecording() and not stop_service):
				self.nextService()
			else:
				if not checkTimespan(
					config.plugins.epgrefresh.begin.value,
					config.plugins.epgrefresh.end.value):

					print("[EPGRefresh] Gone out of timespan while refreshing, sorry!")
					self.cleanUp()
				else:
					print("[EPGRefresh] Box no longer in Standby or Recording started, rescheduling")
					if check_standby and config.plugins.epgrefresh.adapter.value == "main":
						self.session.nav.stopService()
					epgrefreshtimer.add(EPGRefreshTimerEntry(
							time() + config.plugins.epgrefresh.delay_standby.value*60,
							self.refresh,
							nocheck = True)
					)