From fa5b6bf9cc7d4fe852058045bfc2bca4bbf5d8f1 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 5 Jun 2011 12:42:53 -0700 Subject: [PATCH] Fixed history order bug. --- NzbDrone.Core/Providers/HistoryProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Core/Providers/HistoryProvider.cs b/NzbDrone.Core/Providers/HistoryProvider.cs index c1d2a642e..b639eebe2 100644 --- a/NzbDrone.Core/Providers/HistoryProvider.cs +++ b/NzbDrone.Core/Providers/HistoryProvider.cs @@ -49,8 +49,8 @@ namespace NzbDrone.Core.Providers public virtual Quality GetBestQualityInHistory(long episodeId) { - var history = AllItems().Where(c => c.EpisodeId == episodeId).ToList().Select(d => new Quality(d.Quality, d.IsProper)); - history.OrderBy(q => q); + var history = AllItems().Where(c => c.EpisodeId == episodeId).Select(d => new Quality(d.Quality, d.IsProper)).OrderBy(c => c); + return history.FirstOrDefault(); }