Esempio n. 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")
Esempio n. 2
0
File: demo.py Progetto: jMyles/pyano
 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.")
Esempio n. 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"
Esempio n. 4
0
File: web.py Progetto: 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'))
Esempio n. 5
0
def pause():
    return jsonify(player.pause())
Esempio n. 6
0
def pause(request):
    player.pause()
Esempio n. 7
0
def pause():
    return jsonify(player.pause())
Esempio n. 8
0
def pause():
    audit_log.log(
        get_username(request.form.get('token')),
        'Paused/resumed song'
    )
    return jsonify(player.pause())
Esempio n. 9
0
def pause(args):
    log.info('pause')
    player.pause()
Esempio n. 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()
Esempio n. 11
0
File: main.py Progetto: wchill/beats
def pause():
    audit_log.log(get_username(request.form.get('token')),
                  'Paused/resumed song')
    return jsonify(player.pause())
Esempio n. 12
0
def pause():
    player.pause()
Esempio n. 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()