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

[spotify] restart spotify watcher thread on crash

+5 -5
+2 -2
crates/spotify/src/main.rs
··· 86 86 ); 87 87 88 88 // If there's an error, publish a message to restart the thread 89 - match rt.block_on(nc.publish("rocksky.spotify.user", user_id.into())) { 89 + match rt.block_on(nc.publish("rocksky.spotify.user", email.clone().into())) { 90 90 Ok(_) => { 91 91 println!( 92 92 "{} Published message to restart thread for user: {}", ··· 206 206 email.bright_green(), 207 207 e.to_string().bright_red() 208 208 ); 209 - match rt.block_on(nc.publish("rocksky.spotify.user", user_id.into())) { 209 + match rt.block_on(nc.publish("rocksky.spotify.user", email.into())) { 210 210 Ok(_) => {}, 211 211 Err(e) => { 212 212 println!(
+3 -3
crates/spotify/src/types/currently_playing.rs
··· 25 25 #[derive(Debug, Serialize, Deserialize, Clone)] 26 26 pub struct Context { 27 27 pub external_urls: Option<ExternalUrls>, 28 - pub href: String, 28 + pub href: Option<String>, 29 29 #[serde(rename = "type")] 30 - pub context_type: String, 31 - pub uri: String, 30 + pub context_type: Option<String>, 31 + pub uri: Option<String>, 32 32 } 33 33 34 34 #[derive(Debug, Default, Serialize, Deserialize, Clone)]