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()
def playNextVideo(): viewedVideos = filter(lambda video: video.played == False, videos) nextVideo = viewedVideos[:1] if nextVideo: playVideo(nextVideo[0].vid) removeOldVideosFromPlaylist() else: engine.stop() resetPlaylist()
def playNextVideo(): viewedVideos = filter(lambda video:video.played==False, videos) nextVideo = viewedVideos[:1] if nextVideo: playVideo(nextVideo[0].vid) removeOldVideosFromPlaylist() else: engine.stop() resetPlaylist()