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"),
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
return None
return service.seek()
- def __getCurrentPosition(self):
+ def cueGetCurrentPosition(self):
seek = self.__getSeekable()
if seek is None:
return None
return long(r[1])
def jumpPreviousNextMark(self, cmp, alternative=None):
- current_pos = self.__getCurrentPosition()
+ current_pos = self.cueGetCurrentPosition()
if current_pos is None:
return
mark = self.getNearestCutPoint(current_pos, cmp=cmp)
return nearest
def toggleMark(self, onlyremove=False, onlyadd=False, tolerance=5*90000):
- current_pos = self.__getCurrentPosition()
+ current_pos = self.cueGetCurrentPosition()
if current_pos is None:
print "not seekable"
return