diff --git a/app.py b/app.py index 1b0970e..cab0a80 100644 --- a/app.py +++ b/app.py @@ -347,6 +347,17 @@ async def api_volume(): return jsonify(volume) +@app.route("/api/skip", methods=["POST"]) +async def api_skip(): + sock = await mpv_socket_open() + if sock is not None: + await mpv_socket_command(*sock, {"command": ["playlist-next"]}) + sock[1].close() + await sock[1].wait_closed() + + return "ok" + + @app.route("/api/upload", methods=["POST"]) def upload_api(): filename = request.form.get("filename")