Beispiel #1
0
    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")
Beispiel #2
0
 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.")
Beispiel #3
0
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"
Beispiel #4
0
Datei: web.py Projekt: lorc/belyn
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'))
Beispiel #5
0
def pause():
    return jsonify(player.pause())
Beispiel #6
0
def pause(request):
    player.pause()
Beispiel #7
0
def pause():
    return jsonify(player.pause())
Beispiel #8
0
def pause():
    audit_log.log(
        get_username(request.form.get('token')),
        'Paused/resumed song'
    )
    return jsonify(player.pause())
Beispiel #9
0
def pause(args):
    log.info('pause')
    player.pause()
Beispiel #10
0
 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()
Beispiel #11
0
def pause():
    audit_log.log(get_username(request.form.get('token')),
                  'Paused/resumed song')
    return jsonify(player.pause())
Beispiel #12
0
def pause():
    player.pause()
Beispiel #13
0
	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()