mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Use MinBy and MaxBy instead of OrderBy + First
(cherry picked from commit 6ea3d8c127eafbcf9d1b6e9338b737e91e256875) Closes #2323
This commit is contained in:
@@ -881,7 +881,7 @@ namespace NzbDrone.Core.MetadataSource.BookInfo
|
||||
book.Editions = resource.Books.Select(x => MapEdition(x)).ToList();
|
||||
|
||||
// monitor the most popular release
|
||||
var mostPopular = book.Editions.Value.OrderByDescending(x => x.Ratings.Popularity).FirstOrDefault();
|
||||
var mostPopular = book.Editions.Value.MaxBy(x => x.Ratings.Popularity);
|
||||
if (mostPopular != null)
|
||||
{
|
||||
mostPopular.Monitored = true;
|
||||
|
||||
Reference in New Issue
Block a user