Fix Spotify enrichment worker rejecting every track via fallback
Worker checked self.client.sp (non-None even without Spotify auth due to fallback) instead of is_spotify_authenticated(). Searched via iTunes/Deezer fallback, got numeric IDs, rejected them all with warnings. Now sleeps when Spotify isn't authenticated instead of making pointless fallback searches.
This commit is contained in:
parent
0edf6197ec
commit
3c51f27e97
1 changed files with 3 additions and 3 deletions
|
|
@ -152,10 +152,10 @@ class SpotifyWorker:
|
|||
# We intentionally avoid calling is_spotify_authenticated() here
|
||||
# because it makes an API probe that can re-trigger rate limits
|
||||
# and lock users in an infinite rate-limit loop.
|
||||
if not self.client.sp:
|
||||
if not self.client.is_spotify_authenticated():
|
||||
self.client.reload_config()
|
||||
if not self.client.sp:
|
||||
logger.debug("Spotify not configured, sleeping 30s...")
|
||||
if not self.client.is_spotify_authenticated():
|
||||
logger.debug("Spotify not authenticated, sleeping 30s...")
|
||||
time.sleep(30)
|
||||
continue
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue