A decentralized music tracking and discovery platform built on AT Protocol 🎵 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz

Merge branch 'main' into feat/feed-generator

+7 -7
+7 -7
crates/spotify/src/lib.rs
··· 46 46 let mut sub = nc.subscribe("rocksky.spotify.user".to_string()).await?; 47 47 println!("Subscribed to {}", "rocksky.spotify.user".bright_green()); 48 48 49 - let users = find_spotify_users(&pool, 0, 100).await?; 49 + let users = find_spotify_users(&pool, 0, 500).await?; 50 50 println!("Found {} users", users.len().bright_green()); 51 51 52 52 // Shared HashMap to manage threads and their stop flags ··· 262 262 ]) 263 263 .send() 264 264 .await?; 265 - let body = response.text().await?; 266 - if body.contains("error") { 267 - tracing::warn!(client_id = %client_id, "Refresh token response body contains error"); 268 - tracing::error!(body = %body, "Refresh token response body"); 265 + let token = response.text().await?; 266 + let json_token = serde_json::from_str::<AccessToken>(&token); 267 + if let Err(e) = json_token { 268 + println!("Error parsing token: {}", token); 269 + return Err(Error::from(e)); 269 270 } 270 - let token = serde_json::from_str::<AccessToken>(&body)?; 271 - Ok(token) 271 + Ok(json_token.unwrap()) 272 272 } 273 273 274 274 pub async fn get_currently_playing(