add skip route

This commit is contained in:
deneb 2025-03-13 23:00:23 +01:00
parent 148d4333e4
commit b9be6305f1

11
app.py
View file

@ -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")