improve audio stream teardown and enhance robust directory deletion with retries

This commit is contained in:
2026-07-25 21:12:38 +01:00
parent 7806483a86
commit 5185d4dc0b
3 changed files with 140 additions and 22 deletions
+8
View File
@@ -1953,6 +1953,14 @@ export function AlbumView({
onComplete={async () => {
setDeleting(true);
addLog("Deleting album...");
if (audioRef.current) {
audioRef.current.pause();
audioRef.current.removeAttribute("src");
audioRef.current.load();
}
setPlayingTrack(null);
setIsPlaying(false);
await new Promise((resolve) => setTimeout(resolve, 100));
try {
const res = await fetch("/api/delete", {
method: "POST",