Skip to content

Commit

Permalink
treat empty string disambiguation as none
Browse files Browse the repository at this point in the history
  • Loading branch information
lucat1 committed Dec 9, 2023
1 parent f3afc54 commit af2aca7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion server/src/import/search_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ impl From<musicbrainz::Release> for SearchResult {
release: entity::Release {
id: release.id,
title: release.title,
disambiguation: release.disambiguation,
disambiguation: match release.disambiguation {
Some(d) if !d.is_empty() => Some(d),
_ => None,
},
release_group_id: release.release_group.as_ref().map(|r| r.id),
release_type: release
.release_group
Expand Down
1 change: 0 additions & 1 deletion tag/src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ pub fn tags_from_full_release(full_release: &FullRelease) -> Result<TagMap> {
map.insert(TagKey::Media, vec![media_format.to_string()]);
}
let title = if let Some(ref disambiguation) = release.disambiguation {
// TODO: Make the disambiguation format configurable
strfmt(
&settings.library.tagging.title_format,
&HashMap::from([
Expand Down

0 comments on commit af2aca7

Please sign in to comment.