add skip route
This commit is contained in:
parent
148d4333e4
commit
b9be6305f1
1 changed files with 11 additions and 0 deletions
11
app.py
11
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")
|
||||
|
|
Loading…
Add table
Reference in a new issue