improve audio stream teardown and enhance robust directory deletion with retries
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user