Skip to content

Commit

Permalink
Use first artist (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconscious authored Oct 25, 2024
1 parent 6f33431 commit d277523
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AudioTagger.Console/Operations/TagDuplicateFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void Start(

var duplicateGroups = includedFiles
.ToLookup(m =>
RemoveSubstrings(m.ArtistSummary, artistReplacements) +
RemoveSubstrings(m.Artists.FirstOrDefault() ?? string.Empty, artistReplacements) +
RemoveSubstrings(m.Title, titleReplacements),
StringComparer.OrdinalIgnoreCase)
.Where(g => g.Key.HasText() && g.Count() > 1)
Expand Down Expand Up @@ -164,7 +164,7 @@ private static string RemoveSubstrings(string source, ICollection<string> terms)
_ => terms.Aggregate(
new StringBuilder(source),
(sb, term) => sb.Replace(term, string.Empty),
sb => sb.ToString())
sb => sb.ToString().Trim())
};
}

Expand Down

0 comments on commit d277523

Please sign in to comment.