From 8c3dd3730adbe79583424bdb2d08887bb2582feb Mon Sep 17 00:00:00 2001 From: ta264 Date: Mon, 3 Jan 2022 21:17:52 +0000 Subject: [PATCH] Fixed: Determine book author as primary author of most popular edition --- src/NzbDrone.Core/MetadataSource/BookInfo/BookInfoProxy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/MetadataSource/BookInfo/BookInfoProxy.cs b/src/NzbDrone.Core/MetadataSource/BookInfo/BookInfoProxy.cs index 0382220f1..d2241cee1 100644 --- a/src/NzbDrone.Core/MetadataSource/BookInfo/BookInfoProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/BookInfo/BookInfoProxy.cs @@ -324,7 +324,7 @@ namespace NzbDrone.Core.MetadataSource.BookInfo private int GetAuthorId(WorkResource b) { - return b.Books.First().Contributors.FirstOrDefault()?.ForeignId ?? 0; + return b.Books.OrderByDescending(x => x.RatingCount * x.AverageRating).First().Contributors.FirstOrDefault()?.ForeignId ?? 0; } } }