コード例 #1
0
ファイル: control.py プロジェクト: HadokenCode/youtupi
 def GET(self, action):
     with engineLock:
         if action == "play":
             playNextVideo()
         elif action == "stop":
             engine.stop()
             resetPlaylist()
         elif action == "pause":
             engine.togglePause()
         elif action == "volup":
             engine.volumeUp()
         elif action == "voldown":
             engine.volumeDown()
         elif action == "seekbacksmall":
             engine.seekBackSmall()
         elif action == "seekforwardsmall":
             engine.seekForwardSmall()
         elif action == "seekbacklarge":
             engine.seekBackLarge()
         elif action == "seekforwardlarge":
             engine.seekForwardLarge()
         elif action == "prevaudiotrack":
             engine.prevAudioTrack()
         elif action == "nextaudiotrack":
             engine.nextAudioTrack()
コード例 #2
0
ファイル: youtupi.py プロジェクト: orithena/youtupi
	def GET(self, action):
		with engineLock:
			if action == "play":
				playNextVideo()
			elif action == "stop":
				engine.stop()
				resetPlaylist()
			elif action == "pause":
				engine.togglePause()
			elif action == "volup":
				engine.volumeUp()
			elif action == "voldown":
				engine.volumeDown()
			elif action == "seekbacksmall":
				engine.seekBackSmall()
			elif action == "seekforwardsmall":
				engine.seekForwardSmall()
			elif action == "seekbacklarge":
				engine.seekBackLarge()
			elif action == "seekforwardlarge":
				engine.seekForwardLarge()
			elif action == "prevaudiotrack":
				engine.prevAudioTrack()
			elif action == "nextaudiotrack":
				engine.nextAudioTrack()
コード例 #3
0
def playNextVideo():
    viewedVideos = filter(lambda video: video.played == False, videos)
    nextVideo = viewedVideos[:1]
    if nextVideo:
        playVideo(nextVideo[0].vid)
        removeOldVideosFromPlaylist()
    else:
        engine.stop()
        resetPlaylist()
コード例 #4
0
ファイル: playlist.py プロジェクト: kktuax/youtupi
def playNextVideo():
    viewedVideos = filter(lambda video:video.played==False, videos)
    nextVideo = viewedVideos[:1]
    if nextVideo:
        playVideo(nextVideo[0].vid)
        removeOldVideosFromPlaylist()
    else:
        engine.stop()
        resetPlaylist()