mirror of
https://github.com/Readarr/Readarr
synced 2025-12-15 12:52:27 +01:00
parent
759c132797
commit
b4b14a5359
1 changed files with 2 additions and 2 deletions
|
|
@ -590,7 +590,7 @@ private Tuple<string, Book, List<AuthorMetadata>> PollBook(string foreignBookId)
|
|||
}
|
||||
|
||||
var book = MapBook(resource);
|
||||
var authorId = resource.Books.OrderByDescending(x => x.AverageRating * x.RatingCount).First().Contributors.First().ForeignId.ToString();
|
||||
var authorId = GetAuthorId(resource).ToString();
|
||||
var metadata = resource.Authors.Select(MapAuthorMetadata).ToList();
|
||||
|
||||
var series = resource.Series.Select(MapSeries).ToList();
|
||||
|
|
@ -818,7 +818,7 @@ private static Edition MapEdition(BookResource resource)
|
|||
|
||||
private static int GetAuthorId(WorkResource b)
|
||||
{
|
||||
return b.Books.OrderByDescending(x => x.RatingCount * x.AverageRating).First().Contributors.FirstOrDefault()?.ForeignId ?? 0;
|
||||
return b.Books.OrderByDescending(x => x.RatingCount * x.AverageRating).FirstOrDefault(x => x.Contributors.Any())?.Contributors.First().ForeignId ?? 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue