Fixed: Books must match the edition title, not the work title

pull/1448/head
ta264 3 years ago
parent 8c3dd3730a
commit 33e1c4a537

@ -38,19 +38,13 @@ namespace NzbDrone.Core.MediaFiles.BookImport.Identification
Logger.Trace("author: '{0}' vs '{1}'; {2}", authors.ConcatToString("' or '"), edition.Book.Value.AuthorMetadata.Value.Name, dist.NormalizedDistance());
var title = localTracks.MostCommon(x => x.FileTrackInfo.BookTitle) ?? "";
var titleOptions = new List<string> { edition.Title, edition.Book.Value.Title };
var titleOptions = new List<string> { edition.Title };
if (titleOptions[0].Contains("#"))
{
titleOptions.Add(StripSeriesRegex.Replace(titleOptions[0]));
}
var (maintitle, _) = edition.Book.Value.Title.SplitBookTitle(edition.Book.Value.AuthorMetadata.Value.Name);
if (!titleOptions.Contains(maintitle))
{
titleOptions.Add(maintitle);
}
(maintitle, _) = edition.Title.SplitBookTitle(edition.Book.Value.AuthorMetadata.Value.Name);
var (maintitle, _) = edition.Title.SplitBookTitle(edition.Book.Value.AuthorMetadata.Value.Name);
if (!titleOptions.Contains(maintitle))
{
titleOptions.Add(maintitle);

Loading…
Cancel
Save