Addresses all three points from community rate-limiting report:
1. Watchlist scans fetched ALL albums then filtered — 262 albums = 27
API calls per artist. Now determines upfront if full discography is
needed: subsequent scans and time-bounded lookbacks use max_pages=1
(1 API call). Only "full discography" global setting fetches all.
2. MIN_API_INTERVAL (350ms) now configurable via spotify.min_api_interval
setting. Users who get rate-limited frequently can increase the delay.
Floor at 100ms to prevent abuse.
3. Retry-After header extraction improved: added diagnostic logging when
headers exist but lack Retry-After key, plus regex fallback to parse
the value from the error message string.
logger.info(f"Extracted Retry-After from exception headers: {retry_after}")
else:
logger.debug(f"Exception has headers but no Retry-After key. Headers type: {type(exc_headers).__name__}, keys: {list(exc_headers.keys())[:10]ifhasattr(exc_headers,'keys')else'N/A'}")
{title:'Fix Album Folder Splitting',desc:'Collab albums and artist name changes no longer scatter tracks across multiple folders — $albumartist now uses album-level artist consistently'},
{title:'Fix Watchlist Rate Limiting',desc:'Watchlist scans now fetch only newest albums instead of full discography (~90% fewer API calls). Configurable API interval in settings. Better Retry-After header extraction'},
{title:'Webhook THEN Action',desc:'Send HTTP POST to any URL when automations complete — integrate with Gotify, Home Assistant, Slack, n8n. Configurable headers and message template',page:'automations'},
{title:'API Rate Monitor',desc:'Real-time speedometer gauges for all enrichment services on the Dashboard. Click any gauge for 24h history chart. Spotify shows per-endpoint breakdown',page:'dashboard'},