本文整理汇总了Python中Screens.InfoBar.MoviePlayer.doSeekRelative方法的典型用法代码示例。如果您正苦于以下问题:Python MoviePlayer.doSeekRelative方法的具体用法?Python MoviePlayer.doSeekRelative怎么用?Python MoviePlayer.doSeekRelative使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Screens.InfoBar.MoviePlayer
的用法示例。
在下文中一共展示了MoviePlayer.doSeekRelative方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: keyOK
# 需要导入模块: from Screens.InfoBar import MoviePlayer [as 别名]
# 或者: from Screens.InfoBar.MoviePlayer import doSeekRelative [as 别名]
def keyOK(self):
sel = self["config"].getCurrent()[1]
if sel == self.positionEntry:
if self.length:
if self.dvd: # seekTo() doesn't work for DVD Player
oldPosition = self.seek.getPlayPosition()[1]
newPosition = int(float(self.length[1]) / 100.0 * self.percent)
if newPosition > oldPosition:
pts = newPosition - oldPosition
else:
pts = -1*(oldPosition - newPosition)
DVDPlayer.doSeekRelative(self.infobarInstance, pts)
else:
self.seek.seekTo(int(float(self.length[1]) / 100.0 * self.percent))
self.exit()
elif sel == self.minuteInput:
pts = self.minuteInput.value * 60 * 90000
if self.fwd == False:
pts = -1*pts
if self.dvd:
DVDPlayer.doSeekRelative(self.infobarInstance, pts)
elif self.vdb:
VideoDBPlayer.doSeekRelative(self.infobarInstance, pts)
else:
MoviePlayer.doSeekRelative(self.infobarInstance, pts)
self.exit()
示例2: keyOK
# 需要导入模块: from Screens.InfoBar import MoviePlayer [as 别名]
# 或者: from Screens.InfoBar.MoviePlayer import doSeekRelative [as 别名]
def keyOK(self):
sel = self["config"].getCurrent()[1]
if sel == self.positionEntry:
if self.length:
if self.old_dvd: # seekTo() doesn't work for DVD Player
oldPosition = self.seek.getPlayPosition()[1]
newPosition = int(float(self.length[1]) / 100.0 * self.percent)
if newPosition > oldPosition:
pts = newPosition - oldPosition
else:
pts = -1 * (oldPosition - newPosition)
DVDPlayer2.doSeekRelative(self.infobarInstance, pts)
elif self.media_player:
oldPosition = self.seek.getPlayPosition()[1]
newPosition = int(float(self.length[1]) / 100.0 * self.percent)
if newPosition > oldPosition:
pts = newPosition - oldPosition
else:
pts = -1 * (oldPosition - newPosition)
MediaPlayer.doSeekRelative(self.infobarInstance, pts)
elif self.dvd_pli:
oldPosition = self.seek.getPlayPosition()[1]
newPosition = int(float(self.length[1]) / 100.0 * self.percent)
if newPosition > oldPosition:
pts = newPosition - oldPosition
else:
pts = -1 * (oldPosition - newPosition)
DVDPlayer.doSeekRelative(self.infobarInstance, pts)
elif self.ytube:
oldPosition = self.seek.getPlayPosition()[1]
newPosition = int(float(self.length[1]) / 100.0 * self.percent)
if newPosition > oldPosition:
pts = newPosition - oldPosition
else:
pts = -1 * (oldPosition - newPosition)
YouTubePlayer.doSeekRelative(self.infobarInstance, pts)
elif self.tmbd_trailer:
oldPosition = self.seek.getPlayPosition()[1]
newPosition = int(float(self.length[1]) / 100.0 * self.percent)
if newPosition > oldPosition:
pts = newPosition - oldPosition
else:
pts = -1 * (oldPosition - newPosition)
tmbdTrailerPlayer.doSeekRelative(self.infobarInstance, pts)
elif self.vod:
oldPosition = self.seek.getPlayPosition()[1]
newPosition = int(float(self.length[1]) / 100.0 * self.percent)
if newPosition > oldPosition:
pts = newPosition - oldPosition
else:
pts = -1 * (oldPosition - newPosition)
nVODplayer.doSeekRelative(self.infobarInstance, pts)
elif self.yamp_player:
oldPosition = self.seek.getPlayPosition()[1]
newPosition = int(float(self.length[1]) / 100.0 * self.percent)
if newPosition > oldPosition:
pts = newPosition - oldPosition
else:
pts = -1 * (oldPosition - newPosition)
YampScreen.doSeekRelative(self.infobarInstance, pts)
elif self.seasondream:
oldPosition = self.seek.getPlayPosition()[1]
newPosition = int(float(self.length[1]) / 100.0 * self.percent)
if newPosition > oldPosition:
pts = newPosition - oldPosition
else:
pts = -1 * (oldPosition - newPosition)
Player.doSeekRelative(self.infobarInstance, pts)
elif self.cutlisteditor:
oldPosition = self.seek.getPlayPosition()[1]
newPosition = int(float(self.length[1]) / 100.0 * self.percent)
if newPosition > oldPosition:
pts = newPosition - oldPosition
else:
pts = -1 * (oldPosition - newPosition)
CutListEditor.doSeekRelative(self.infobarInstance, pts)
elif self.movie:
self.seek.seekTo(int(float(self.length[1]) / 100.0 * self.percent))
elif self.timeshift:
self.seek.seekTo(int(float(self.length[1]) / 100.0 * self.percent))
else:
pass
self.exit()
elif sel == self.minuteInput:
pts = self.minuteInput.value * 60 * 90000
if self.fwd == False:
pts = -1 * pts
if self.old_dvd:
DVDPlayer2.doSeekRelative(self.infobarInstance, pts)
elif self.media_player:
MediaPlayer.doSeekRelative(self.infobarInstance, pts)
elif self.dvd_pli:
DVDPlayer.doSeekRelative(self.infobarInstance, pts)
elif self.ytube:
YouTubePlayer.doSeekRelative(self.infobarInstance, pts)
elif self.tmbd_trailer:
tmbdTrailerPlayer.doSeekRelative(self.infobarInstance, pts)
elif self.vod:
nVODplayer.doSeekRelative(self.infobarInstance, pts)
elif self.yamp_player:
#.........这里部分代码省略.........