diff --git a/allstarr/wwwroot/index.html b/allstarr/wwwroot/index.html
index 37b4ff3..c394728 100644
--- a/allstarr/wwwroot/index.html
+++ b/allstarr/wwwroot/index.html
@@ -2010,15 +2010,18 @@
showToast('Step 1/3: Clearing caches...', 'info', 2000);
await fetch('/api/admin/cache/clear', { method: 'POST' });
+ // Wait for cache to be fully cleared
+ await new Promise(resolve => setTimeout(resolve, 2000));
+
// Step 2: Refresh playlists from Spotify
showToast('Step 2/3: Fetching from Spotify...', 'info', 2000);
await fetch('/api/admin/playlists/refresh', { method: 'POST' });
- // Wait a bit for Spotify fetch to complete
- await new Promise(resolve => setTimeout(resolve, 3000));
+ // Wait for Spotify fetch to complete
+ await new Promise(resolve => setTimeout(resolve, 5000));
// Step 3: Match all tracks
- showToast('Step 3/3: Matching all tracks...', 'info', 2000);
+ showToast('Step 3/3: Matching all tracks (this may take several minutes)...', 'info', 3000);
const res = await fetch('/api/admin/playlists/match-all', { method: 'POST' });
const data = await res.json();
@@ -2029,7 +2032,7 @@
fetchPlaylists();
// Hide warning banner after refresh
document.getElementById('matching-warning-banner').style.display = 'none';
- }, 2000);
+ }, 3000);
} else {
showToast(data.error || 'Failed to match tracks', 'error');
document.getElementById('matching-warning-banner').style.display = 'none';