diff options
| -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") |
