From b356016054ad071ce47cdc9028ea305019f270f4 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Thu, 24 Apr 2008 08:47:46 +0000 Subject: [PATCH] re-add SeekBackward workaround ... but dont use it for the dvd player --- .../Plugins/Extensions/DVDPlayer/plugin.py | 2 +- lib/python/Screens/InfoBarGenerics.py | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index 45c5ddee..2169cc8c 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -228,7 +228,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP HelpableScreen.__init__(self) self.save_infobar_seek_config() self.change_infobar_seek_config() - InfoBarSeek.__init__(self) + InfoBarSeek.__init__(self, useSeekBackHack=False) InfoBarPVRState.__init__(self) self.dvdScreen = self.session.instantiateDialog(DVDOverlay) diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index b0572979..dfbb3f47 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -593,7 +593,7 @@ class InfoBarSeek: SEEK_STATE_PAUSE = (1, 0, 0, "||") SEEK_STATE_EOF = (1, 0, 0, "END") - def __init__(self, actionmap = "InfobarSeekActions"): + def __init__(self, actionmap = "InfobarSeekActions", useSeekBackHack=True): self.__event_tracker = ServiceEventTracker(screen=self, eventmap= { iPlayableService.evSeekableStatusChanged: self.__seekableStatusChanged, @@ -608,7 +608,7 @@ class InfoBarSeek: self.eofInhibitTimer = eTimer() self.eofInhibitTimer.timeout.get().append(self.inhibitEof) -# self.minSpeedBackward = 16 + self.minSpeedBackward = useSeekBackHack and 16 or 0 class InfoBarSeekActionMap(HelpableActionMap): def __init__(self, screen, *args, **kwargs): @@ -666,13 +666,12 @@ class InfoBarSeek: def makeStateBackward(self, n): minspeed = config.seek.stepwise_minspeed.value repeat = int(config.seek.stepwise_repeat.value) -# if n < self.minSpeedBackward: -# r = (self.minSpeedBackward - 1)/ n + 1 -# if minspeed != "Never" and n >= int(minspeed) and repeat > 1: -# r = max(r, repeat) -# return (0, -n * r, r, "<< %dx" % n) -# el - if minspeed != "Never" and n >= int(minspeed) and repeat > 1: + if self.minSpeedBackward and n < self.minSpeedBackward: + r = (self.minSpeedBackward - 1)/ n + 1 + if minspeed != "Never" and n >= int(minspeed) and repeat > 1: + r = max(r, repeat) + return (0, -n * r, r, "<< %dx" % n) + elif minspeed != "Never" and n >= int(minspeed) and repeat > 1: return (0, -n * repeat, repeat, "<< %dx" % n) else: return (0, -n, 0, "<< %dx" % n) -- 2.30.2