dnd-music-console/croaker/routes.py

18 lines
296 B
Python
Raw Normal View History

2024-03-01 01:00:17 -08:00
from bottle import route
from croaker import controller
@route("/play/<playlist_name>")
def play(playlist_name=None):
if not controller.play_next(playlist_name):
return
return "OK"
@route("/skip")
def skip():
if not controller.play_next():
return
return "OK"