def post(self): data = self.request.get('input') logging.error("data") if data == "pause" or data == "play": player.pause() elif data == "ffwd30": player.fastfwd30() elif data == "rwnd30": player.rewind30() elif data == "volup": player.volume_up() elif data == "voldown": player.volume_down() elif data == "stop": player.stop() self.redirect("/explorer") return elif data == "next": player.next_chapter() elif data == "previous": player.previous_chapter() elif data == "info": player.info() else : player.stop() self.redirect("/explorer") return self.redirect("/remote")
def render_POST(self, request): if request.args.get(b'action') == [b"next"]: new_song = player.next_song() if request.args.get(b'action') == [b"pause"]: player.pause() if request.args.get(b'velocity_adjustment') is not None: player.controls['VELOCITY_ADJUSTMENT'] = int( request.args.get(b'velocity_adjustment')[0]) return (b"Hello world.")
def endEdit(): global editing, endTime, selectType print "Snippy: end edit" if(editing): editing = False #save the end time of the edit before showing the popup for #selecting the type of edit endTime = player.getTime() player.pause() selectType = diags.SelectEditTypeBox("") selectType.showPopUp(addEdit) refreshWindow() else: print "Snippy: end edit, but was not editing"
def player_cmd(request): if not player.playing(): request.session.flash(u"А плеер то не играет!") return HTTPFound(location=request.route_url('player')) cmd = request.matchdict["cmd"] if cmd=="pause": player.pause() elif cmd=="stop": player.stop() elif cmd=="seek_left": player.seek(-5) elif cmd=="seek_right": player.seek(5) elif cmd=="snd_up": player.volume(5) elif cmd=="snd_down": player.volume(-5) else: request.session.flash(u"Не знаю что за команда") return HTTPFound(location=request.route_url('player'))
def pause(): return jsonify(player.pause())
def pause(request): player.pause()
def pause(): audit_log.log( get_username(request.form.get('token')), 'Paused/resumed song' ) return jsonify(player.pause())
def pause(args): log.info('pause') player.pause()
def play(self, event): if player.p.loaded == True and player.p.streaming == False: if player.p.stream.is_playing == False: player.play() else: player.pause()
def pause(): audit_log.log(get_username(request.form.get('token')), 'Paused/resumed song') return jsonify(player.pause())
def pause(): player.pause()
def play(self, event): if player.p.loaded==True and player.p.streaming==False: if player.p.stream.is_playing==False: player.play() else: player.pause()