task.cancel() triggers _play_loop's finally block asynchronously. When cmd_skip or cmd_seek called _ensure_loop before the finally block ran, the old task's cleanup would overwrite the new task's state -- causing !np to report "Nothing playing" while audio was still streaming. Now await the cancelled task before restarting the loop, ensuring the finally block completes first. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 KiB
29 KiB