diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-02-27 23:32:32 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-02-27 23:32:32 +0000 |
| commit | 7f5aa3b85debad0a5642cc5c57cc5b967093ff3e (patch) | |
| tree | f07e26f50af75d88106c27da9c3bfd7f8c6bcb80 | |
| parent | f01b61f8a3c92f43132fdc078e5d3ab0b1345c4a (diff) | |
| download | enigma2-7f5aa3b85debad0a5642cc5c57cc5b967093ff3e.tar.gz enigma2-7f5aa3b85debad0a5642cc5c57cc5b967093ff3e.zip | |
skip 30,90,270 seconds with 1/3, 4/6, 7/9
| -rw-r--r-- | data/keymap.xml | 17 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBarGenerics.py | 17 |
2 files changed, 27 insertions, 7 deletions
diff --git a/data/keymap.xml b/data/keymap.xml index f77c81cc..3641df94 100644 --- a/data/keymap.xml +++ b/data/keymap.xml @@ -162,6 +162,13 @@ <key id="KEY_LEFT" mapto="seekBack" flags="m" /> <key id="KEY_RIGHT" mapto="seekFwd" flags="m" /> + + <key id="KEY_1" mapto="seek:-30" flags="m" /> + <key id="KEY_3" mapto="seek:30" flags="m" /> + <key id="KEY_4" mapto="seek:-90" flags="m" /> + <key id="KEY_6" mapto="seek:90" flags="m" /> + <key id="KEY_7" mapto="seek:-270" flags="m" /> + <key id="KEY_9" mapto="seek:270" flags="m" /> </map> <map context="InfobarTimeshiftActions"> @@ -298,11 +305,11 @@ <key id="KEY_POWER" mapto="power" flags="m" /> </map> <map context="CutListEditorActions"> - <key id="KEY_1" mapto="setIn" flags="m" /> - <key id="KEY_2" mapto="setOut" flags="m" /> - <key id="KEY_3" mapto="setMark" flags="m" /> - <key id="KEY_4" mapto="addMark" flags="m" /> - <key id="KEY_5" mapto="removeMark" flags="m" /> + <key id="KEY_NEXT" mapto="setIn" flags="m" /> + <key id="KEY_PREVIOUS" mapto="setOut" flags="m" /> + <key id="KEY_0" mapto="setMark" flags="m" /> + <key id="KEY_CHANNELUP" mapto="addMark" flags="m" /> + <key id="KEY_CHANNELDOWN" mapto="removeMark" flags="m" /> <key id="KEY_EXIT" mapto="leave" flags="m" /> <key id="KEY_OK" mapto="showMenu" flags="m" /> </map> diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index d6a10012..84d04f92 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -540,7 +540,20 @@ class InfoBarSeek: iPlayableService.evEOF: self.__evEOF, iPlayableService.evSOF: self.__evSOF, }) - self["SeekActions"] = HelpableActionMap(self, "InfobarSeekActions", + + class InfoBarSeekActionMap(HelpableActionMap): + def __init__(self, screen, *args, **kwargs): + HelpableActionMap.__init__(self, screen, *args, **kwargs) + self.screen = screen + + def action(self, contexts, action): + if action[:5] == "seek:": + time = int(action[5:]) + self.screen.seekRelative(time * 90000) + else: + HelpableActionMap.action(self, contexts, action) + + self["SeekActions"] = InfoBarSeekActionMap(self, "InfobarSeekActions", { "pauseService": (self.pauseService, "pause"), "unPauseService": (self.unPauseService, "continue"), @@ -781,7 +794,7 @@ class InfoBarSeek: def seekRelative(self, diff): seekable = self.getSeek() if seekable is not None: - seekable.seekRelative(0, diff) + seekable.seekRelative(1, diff) from Screens.PVRState import PVRState |
