Compare commits

...

2 commits

Author SHA1 Message Date
b9be6305f1 add skip route 2025-03-13 23:00:23 +01:00
148d4333e4 format, move /upload 2025-03-13 22:50:06 +01:00

19
app.py
View file

@ -198,6 +198,11 @@ def filemgr(path=""):
return render_template("filemanager.html", files=files, path=path)
@app.route("/upload")
def upload():
return render_template("upload.html")
@app.route("/api/start", methods=["POST"])
async def api_start():
if mpv_running():
@ -341,9 +346,17 @@ async def api_volume():
return jsonify(volume)
@app.route("/upload")
def upload():
return render_template("upload.html")
@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():