Fix type error in listenbrainz response

This commit is contained in:
jude
2025-09-19 19:00:22 +01:00
parent bca4cd4eb1
commit 558c79d0cb
4 changed files with 50 additions and 38 deletions

View File

@@ -92,7 +92,10 @@ async fn update_playlist(
.iter()
.find(|s| {
alpha_compare(&s.title, &recording.track_name)
&& alpha_compare(&s.album, &recording.release_name)
&& match &recording.release_name {
Some(release_name) => alpha_compare(&s.album, release_name),
None => true,
}
})
.cloned();

View File

@@ -82,7 +82,7 @@ pub struct Artist {
#[derive(Deserialize)]
pub struct RecordingsEntry {
pub track_name: String,
pub release_name: String,
pub release_name: Option<String>,
pub artist_name: String,
pub artists: Option<Vec<Artist>>,
}