History stores SeriesId now

pull/2/head
Mark McDowall 12 years ago
parent 30a24fd0b4
commit cdc9098ac7

@ -17,9 +17,6 @@ namespace NzbDrone.Core.History
public string NzbInfoUrl { get; set; } public string NzbInfoUrl { get; set; }
public string ReleaseGroup { get; set; } public string ReleaseGroup { get; set; }
// public LazyLoaded<Episode> Episode { get; set; }
// public LazyLoaded<Series> Series { get; set; }
public Episode Episode { get; set; } public Episode Episode { get; set; }
public Series Series { get; set; } public Series Series { get; set; }
} }

@ -29,7 +29,6 @@ namespace NzbDrone.Core.History
Delete(c=> c.Date < cutoff); Delete(c=> c.Date < cutoff);
} }
public List<QualityModel> GetBestQualityInHistory(int episodeId) public List<QualityModel> GetBestQualityInHistory(int episodeId)
{ {
var history = Query.Where(c => c.EpisodeId == episodeId); var history = Query.Where(c => c.EpisodeId == episodeId);

@ -64,6 +64,7 @@ namespace NzbDrone.Core.History
Indexer = message.Episode.Report.Indexer, Indexer = message.Episode.Report.Indexer,
Quality = message.Episode.ParsedEpisodeInfo.Quality, Quality = message.Episode.ParsedEpisodeInfo.Quality,
NzbTitle = message.Episode.Report.Title, NzbTitle = message.Episode.Report.Title,
SeriesId = episode.SeriesId,
EpisodeId = episode.Id, EpisodeId = episode.Id,
NzbInfoUrl = message.Episode.Report.NzbInfoUrl, NzbInfoUrl = message.Episode.Report.NzbInfoUrl,
ReleaseGroup = message.Episode.Report.ReleaseGroup, ReleaseGroup = message.Episode.Report.ReleaseGroup,

@ -45,8 +45,6 @@ namespace NzbDrone.Core.Indexers
.ThenBy(c => c.Episodes.Select(e => e.EpisodeNumber).MinOrDefault()) .ThenBy(c => c.Episodes.Select(e => e.EpisodeNumber).MinOrDefault())
.ThenBy(c => c.Report.Age); .ThenBy(c => c.Report.Age);
foreach (var episodeParseResult in qualifiedReports) foreach (var episodeParseResult in qualifiedReports)
{ {
try try

Loading…
Cancel
Save