From 36e061f9db1a7b99c19bcebd960e47c42616e6c3 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Tue, 6 Oct 2026 12:59:34 +1300 Subject: terminate before music() on next --- backend.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'backend.py') diff --git a/backend.py b/backend.py index 35cc6b1..2def49c 100644 --- a/backend.py +++ b/backend.py @@ -133,6 +133,12 @@ def music(): @app.get("/automate/music/next") def music_next(): + global music_process + + if music_process and music_process.poll() is None: + music_process.terminate() + music_process = None + return music() @app.get("/automate/music/stop") -- cgit v1.2.3