ocarina/html/controls.py
Bryan Schumaker a88f8225a7 Web remote controls
I can play, pause, stop, and advance to the next song through the web
interface.
2010-11-19 22:47:41 -05:00

24 lines
440 B
Python

# Bryan Schumaker (11/18/2010)
import libsaria.audio
import libsaria.sources
play = libsaria.audio.play
pause = libsaria.audio.pause
stop = libsaria.audio.stop
next = libsaria.sources.plist_next
def to_html(wfile, args):
action = args["a"]
ret = False
if action == "play":
ret = play()
elif action == "pause":
ret = pause()
elif action == "stop":
ret = stop()
elif action == "next":
ret = next()
wfile.write(str(ret))