diff options
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/UsageConfig.py | 1 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBarGenerics.py | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py index 7a286da1..393dbbc4 100644 --- a/lib/python/Components/UsageConfig.py +++ b/lib/python/Components/UsageConfig.py @@ -14,6 +14,7 @@ def InitUsageConfig(): ("8", "8 " + _("seconds")), ("9", "9 " + _("seconds")), ("10", "10 " + _("seconds"))]) config.usage.show_infobar_on_zap = ConfigYesNo(default = True) config.usage.show_infobar_on_skip = ConfigYesNo(default = True) + config.usage.show_infobar_on_event_change = ConfigYesNo(default = True) config.usage.hdd_standby = ConfigSelection(default = "120", choices = [ ("0", _("no standby")), ("2", "10 " + _("seconds")), ("6", "30 " + _("seconds")), ("12", "1 " + _("minute")), ("24", "2 " + _("minutes")), diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 62cc5f3b..e364def9 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -70,7 +70,8 @@ class InfoBarShowHide: self.__event_tracker = ServiceEventTracker(screen=self, eventmap= { - iPlayableService.evStart: self.__serviceStarted + iPlayableService.evStart: self.__serviceStarted, + iPlayableService.evUpdatedEventInfo: self.__eventInfoChanged }) self.__state = self.STATE_SHOWN @@ -83,7 +84,19 @@ class InfoBarShowHide: self.onShow.append(self.__onShow) self.onHide.append(self.__onHide) + def __eventInfoChanged(self): + old_begin_time = self.current_begin_time + service = self.session.nav.getCurrentService() + info = service and service.info() + ptr = info and info.getEvent(0) + if ptr: + self.current_begin_time = ptr.getBeginTime() + if config.usage.show_infobar_on_event_change.value: + if old_begin_time and old_begin_time != self.current_begin_time: + self.doShow() + def __serviceStarted(self): + self.current_begin_time=0 if config.usage.show_infobar_on_zap.value: self.doShow() |
