Fixed: Error getting candidates if parsed author is null

This commit is contained in:
ta264 2021-07-14 21:44:33 +01:00
parent b8a3f09891
commit 60a49e3a03
2 changed files with 7 additions and 3 deletions

View file

@ -173,10 +173,13 @@ private List<CandidateEdition> GetDbCandidates(LocalEdition localEdition, bool i
{
foreach (var authorTag in authorTags)
{
var possibleAuthors = _authorService.GetCandidates(authorTag);
foreach (var author in possibleAuthors)
if (authorTag.IsNotNullOrWhiteSpace())
{
candidateReleases.AddRange(GetDbCandidatesByAuthor(localEdition, author, includeExisting));
var possibleAuthors = _authorService.GetCandidates(authorTag);
foreach (var author in possibleAuthors)
{
candidateReleases.AddRange(GetDbCandidatesByAuthor(localEdition, author, includeExisting));
}
}
}
}

View file

@ -81,6 +81,7 @@ public List<LocalEdition> Identify(List<LocalBook> localTracks, IdentificationOv
{
i++;
_logger.ProgressInfo($"Identifying book {i}/{releases.Count}");
_logger.Debug($"Identifying book files:\n{localRelease.LocalBooks.Select(x => x.Path).ConcatToString("\n")}");
IdentifyRelease(localRelease, idOverrides, config);
}