mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-09 23:55:10 -05:00
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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user