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

run cargo fmt

+11 -5
+11 -5
crates/scrobbler/src/listenbrainz/core/submit.rs
··· 27 28 const RETRIES: usize = 5; 29 for attempt in 1..=RETRIES { 30 - match scrobble_listenbrainz(pool, cache, &payload, token).await.with_context( 31 - || format!("Attempt {}/{}: Error submitting listens", attempt, RETRIES), 32 - ) { 33 Ok(_) => { 34 return Ok(HttpResponse::Ok().json(json!({ 35 "status": "ok", ··· 48 "message": format!("Failed to parse listens: {}", e) 49 }))); 50 } 51 - println!("Retryable error on attempt {}/{}: {}", attempt, RETRIES, e.to_string().yellow()); 52 println!("{:#?}", payload); 53 54 if attempt == RETRIES { ··· 65 66 unreachable!(); 67 68 - /* match scrobble_listenbrainz(pool, cache, payload, token).await { 69 Ok(_) => Ok(HttpResponse::Ok().json(json!({ 70 "status": "ok", 71 "payload": {
··· 27 28 const RETRIES: usize = 5; 29 for attempt in 1..=RETRIES { 30 + match scrobble_listenbrainz(pool, cache, &payload, token) 31 + .await 32 + .with_context(|| format!("Attempt {}/{}: Error submitting listens", attempt, RETRIES)) 33 + { 34 Ok(_) => { 35 return Ok(HttpResponse::Ok().json(json!({ 36 "status": "ok", ··· 49 "message": format!("Failed to parse listens: {}", e) 50 }))); 51 } 52 + println!( 53 + "Retryable error on attempt {}/{}: {}", 54 + attempt, 55 + RETRIES, 56 + e.to_string().yellow() 57 + ); 58 println!("{:#?}", payload); 59 60 if attempt == RETRIES { ··· 71 72 unreachable!(); 73 74 + /* match scrobble_listenbrainz(pool, cache, payload, token).await { 75 Ok(_) => Ok(HttpResponse::Ok().json(json!({ 76 "status": "ok", 77 "payload": {