Compare commits
2 commits
9e8aa40c96
...
b9be6305f1
Author | SHA1 | Date | |
---|---|---|---|
b9be6305f1 | |||
148d4333e4 |
1 changed files with 16 additions and 3 deletions
19
app.py
19
app.py
|
@ -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():
|
||||
|
|
Loading…
Add table
Reference in a new issue