当前位置: 首页>>代码示例>>Python>>正文


Python MoviePlayer.doSeekRelative方法代码示例

本文整理汇总了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()
开发者ID:Haehnchen,项目名称:enigma2-plugins,代码行数:28,代码来源:plugin.py

示例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:
#.........这里部分代码省略.........
开发者ID:Taapat,项目名称:enigma2-plugins,代码行数:103,代码来源:plugin.py


注:本文中的Screens.InfoBar.MoviePlayer.doSeekRelative方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。