diff --git a/epgrefresh/src/EPGRefresh.py b/epgrefresh/src/EPGRefresh.py index c9952a553..e6549bf3b 100644 --- a/epgrefresh/src/EPGRefresh.py +++ b/epgrefresh/src/EPGRefresh.py @@ -281,7 +281,7 @@ def cleanUp(self): except: pass if config.plugins.epgrefresh.parse_autotimer.value: - self.maybeStopAdapter() + self.refreshAdapter.play(self.refreshAdapter.previousService) try: from Plugins.Extensions.AutoTimer.plugin import autotimer if autotimer is None: diff --git a/epgrefresh/src/MainPictureAdapter.py b/epgrefresh/src/MainPictureAdapter.py index 32d646047..01ad07dc4 100644 --- a/epgrefresh/src/MainPictureAdapter.py +++ b/epgrefresh/src/MainPictureAdapter.py @@ -30,8 +30,10 @@ def prepare(self): Notifications.AddPopup(_("EPG refresh starts scanning channels."), MessageBox.TYPE_INFO, 4, NOTIFICATIONID) except: pass + self.wasInStandby = None self.previousService = self.navcore.getCurrentlyPlayingServiceOrGroup() if self.previousService is None and Screens.Standby.inStandby: + self.wasInStandby = True self.previousService = eServiceReference(config.tv.lastservice.value) try: self.lastCount = Components.ServiceEventTracker.InfoBarCount @@ -58,7 +60,13 @@ def stop(self): self.rotorTimer.start(1500, True) else: if self.previousService is not None: - self.navcore.playService(self.previousService) + if self.wasInStandby: + from Screens.InfoBar import InfoBar + csel = InfoBar.instance and InfoBar.instance.servicelist + if csel: + csel.servicelist.setCurrent(self.previousService, adjust=False) + self.previousService = csel.getCurrentSelection() + self.navcore.playService(self.previousService, forceRestart=self.wasInStandby) config.tv.lastservice.value = self.previousService.toString() config.tv.lastservice.save() else: