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

Configure Feed

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

Make Commit.record and Commit.cid optional

Change Commit.record and Commit.cid to Option to reflect that commits
may omit these fields. Update save_scrobble to unwrap record before
deserializing.

+3 -3
+1 -1
crates/jetstream/src/repo.rs
··· 56 56 if commit.collection == SCROBBLE_NSID { 57 57 let mut tx = pool.begin().await?; 58 58 let scrobble_record: ScrobbleRecord = 59 - serde_json::from_value(commit.record.clone())?; 59 + serde_json::from_value(commit.record.unwrap().clone())?; 60 60 61 61 let album_id = save_album(&mut tx, scrobble_record.clone()).await?; 62 62 let artist_id = save_artist(&mut tx, scrobble_record.clone()).await?;
+2 -2
crates/jetstream/src/types.rs
··· 15 15 pub operation: String, 16 16 pub collection: String, 17 17 pub rkey: String, 18 - pub record: Value, 19 - pub cid: String, 18 + pub record: Option<Value>, 19 + pub cid: Option<String>, 20 20 } 21 21 22 22 #[derive(Debug, Deserialize, Clone)]