CRITICAL: Stop hammering Spotify API on status checks

- GetStatus() no longer calls Spotify API at all
- Status is now determined purely from configuration
- Fixes rate limiting issue (429 errors every 30 seconds)
- Spotify API should only be called when actually fetching playlists
This commit is contained in:
2026-02-03 15:08:17 -05:00
parent 4c6406ef8f
commit c7f6783fa2
2 changed files with 10 additions and 39 deletions

View File

@@ -938,16 +938,11 @@
const authStatus = document.getElementById('spotify-auth-status');
const cookieAgeEl = document.getElementById('spotify-cookie-age');
if (data.spotify.authStatus === 'authenticated') {
if (data.spotify.authStatus === 'configured') {
statusBadge.className = 'status-badge success';
statusBadge.innerHTML = '<span class="status-dot"></span>Spotify Connected';
authStatus.textContent = 'Authenticated';
statusBadge.innerHTML = '<span class="status-dot"></span>Spotify Ready';
authStatus.textContent = 'Cookie Set';
authStatus.className = 'stat-value success';
} else if (data.spotify.authStatus === 'invalid_cookie') {
statusBadge.className = 'status-badge error';
statusBadge.innerHTML = '<span class="status-dot"></span>Cookie Invalid';
authStatus.textContent = 'Invalid Cookie';
authStatus.className = 'stat-value error';
} else if (data.spotify.authStatus === 'missing_cookie') {
statusBadge.className = 'status-badge warning';
statusBadge.innerHTML = '<span class="status-dot"></span>Cookie Missing';