Fixed bug in history check.

This commit is contained in:
kay.one 2011-06-05 12:15:46 -07:00
commit 4c8b1d9604
2 changed files with 5 additions and 3 deletions

View file

@ -49,8 +49,8 @@ namespace NzbDrone.Core.Providers
public virtual Quality GetBestQualityInHistory(long episodeId)
{
var history = AllItems().Where(c => c.EpisodeId == episodeId).Select(d => new Quality() { QualityType = d.Quality, Proper = d.IsProper }).ToList();
history.Sort();
var history = AllItems().Where(c => c.EpisodeId == episodeId).ToList().Select(d => new Quality(d.Quality, d.IsProper));
history.OrderBy(q => q);
return history.FirstOrDefault();
}