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

Configure Feed

Select the types of activity you want to include in your feed.

fix(navidrome): add json feature to reqwest for ATProto scrobble POST

+15 -9
+1
crates/navidrome/Cargo.toml
··· 32 32 reqwest = { version = "0.12.12", features = [ 33 33 "rustls-tls", 34 34 "stream", 35 + "json", 35 36 ], default-features = false } 36 37 rust-s3 = { version = "0.35.1", features = [ 37 38 "tokio-rustls-tls",
+6 -3
crates/navidrome/src/api.rs
··· 33 33 let token = match generate_token(&did) { 34 34 Ok(t) => t, 35 35 Err(e) => { 36 - tracing::warn!("JWT generation failed, scrobble not published to ATProto: {}", e); 36 + tracing::warn!( 37 + "JWT generation failed, scrobble not published to ATProto: {}", 38 + e 39 + ); 37 40 return; 38 41 } 39 42 }; 40 43 41 - let api_base = env::var("ROCKSKY_API_URL") 42 - .unwrap_or_else(|_| "https://api.rocksky.app".to_string()); 44 + let api_base = 45 + env::var("ROCKSKY_API_URL").unwrap_or_else(|_| "https://api.rocksky.app".to_string()); 43 46 44 47 let genres: Option<Vec<String>> = track.genre.as_ref().map(|g| vec![g.clone()]); 45 48
+8 -6
crates/navidrome/src/repo/user.rs
··· 3 3 4 4 use crate::xata::user::UserWithApiKey; 5 5 6 - pub async fn get_user_did_by_id(pool: &Pool<Postgres>, user_id: &str) -> Result<Option<String>, Error> { 7 - let row: Option<(String,)> = 8 - sqlx::query_as(r#"SELECT did FROM users WHERE xata_id = $1"#) 9 - .bind(user_id) 10 - .fetch_optional(pool) 11 - .await?; 6 + pub async fn get_user_did_by_id( 7 + pool: &Pool<Postgres>, 8 + user_id: &str, 9 + ) -> Result<Option<String>, Error> { 10 + let row: Option<(String,)> = sqlx::query_as(r#"SELECT did FROM users WHERE xata_id = $1"#) 11 + .bind(user_id) 12 + .fetch_optional(pool) 13 + .await?; 12 14 Ok(row.map(|(did,)| did)) 13 15 } 14 16