Example #1
0
 def GET(self):
     # do pause
     print "pause"
     if player.get_state() == 'play':
         player.start_stop()
     else:
         print "has been pause"
Example #2
0
 def GET(self):
     # do pause
     print "pause"
     if player.get_state() == 'play':
         player.start_stop()
     else :
         print "has been pause"
Example #3
0
 def GET(self):
     # do play
     print "play"
     if player.get_state() == 'null' or player.get_state() == 'pause':
         player.start_stop()
     else:
         print "has been play"
     # raise web.seeother('/')
     web.header('Content-Type', 'application/json')
     return simplejson.dumps(player.get_current_song())
Example #4
0
 def GET(self):
     # do play
     print "play"
     if player.get_state() == 'null' or player.get_state() == 'pause' :
         player.start_stop()
     else :
         print "has been play"
     # raise web.seeother('/')
     web.header('Content-Type', 'application/json') 
     return simplejson.dumps(player.get_current_song())