Fix 'Loading playlist...' stuck forever on error

openDownloadMissingModal showed loading overlay but didn't hide it
on error paths (playlist not found, fetch failure). The overlay
persisted across page navigation, blocking the entire UI.
This commit is contained in:
Broque Thomas 2026-04-18 08:37:31 -07:00
parent f4aaab8a66
commit ad9d5817cf

View file

@ -12093,6 +12093,7 @@ async function openDownloadMissingModal(playlistId) {
const playlist = spotifyPlaylists.find(p => p.id === playlistId);
if (!playlist) {
showToast('Could not find playlist data.', 'error');
hideLoadingOverlay();
return;
}
@ -12109,6 +12110,7 @@ async function openDownloadMissingModal(playlistId) {
playlistTrackCache[playlistId] = tracks;
} catch (error) {
showToast(`Failed to fetch tracks: ${error.message}`, 'error');
hideLoadingOverlay();
return;
}
}