diff options
| author | Arslaan Pathan <[email protected]> | 2026-10-06 12:59:34 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-10-06 12:59:34 +1300 |
| commit | 36e061f9db1a7b99c19bcebd960e47c42616e6c3 (patch) | |
| tree | 58390e96debfaef762342e2c3ac2fd735d33661b /backend.py | |
| parent | 90bde93d0462bb943cd100bfd87781e4232d1b82 (diff) | |
| download | remote-automation-36e061f9db1a7b99c19bcebd960e47c42616e6c3.tar.xz remote-automation-36e061f9db1a7b99c19bcebd960e47c42616e6c3.zip | |
terminate before music() on next
Diffstat (limited to 'backend.py')
| -rw-r--r-- | backend.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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") |
