Fall back to just matching song title if album can't be matched
Fixes most cases where a song couldn't be found on the media server
This commit is contained in:
@ -95,10 +95,22 @@ async fn update_playlist(
|
||||
tracks.push(track.id);
|
||||
}
|
||||
None => {
|
||||
error!(
|
||||
"Couldn't find matching track for {} - {}",
|
||||
recording.track_name, recording.artist_name
|
||||
)
|
||||
let filtered = search_results
|
||||
.iter()
|
||||
.find(|s| alpha_compare(&s.title, &recording.track_name))
|
||||
.cloned();
|
||||
|
||||
match filtered {
|
||||
Some(track) => {
|
||||
tracks.push(track.id);
|
||||
}
|
||||
None => {
|
||||
error!(
|
||||
"Couldn't find matching track for {} - {}",
|
||||
recording.track_name, recording.artist_name
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user