mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
cleaned up history lookup.
This commit is contained in:
parent
cd6f0fc55c
commit
b9fac94eca
7 changed files with 24 additions and 18 deletions
|
@ -13,7 +13,7 @@ namespace NzbDrone.Core.History
|
|||
List<History> All();
|
||||
void Purge();
|
||||
void Trim();
|
||||
QualityModel GetBestQualityInHistory(int seriesId, int seasonNumber, int episodeNumber);
|
||||
QualityModel GetBestQualityInHistory(int episodeId);
|
||||
}
|
||||
|
||||
public class HistoryService : IHistoryService, IHandle<EpisodeGrabbedEvent>
|
||||
|
@ -43,9 +43,9 @@ namespace NzbDrone.Core.History
|
|||
_historyRepository.Trim();
|
||||
}
|
||||
|
||||
public virtual QualityModel GetBestQualityInHistory(int seriesId, int seasonNumber, int episodeNumber)
|
||||
public virtual QualityModel GetBestQualityInHistory(int episodeId)
|
||||
{
|
||||
return _historyRepository.GetBestQualityInHistory(seriesId, seasonNumber, episodeNumber);
|
||||
return _historyRepository.GetBestQualityInHistory(episodeId);
|
||||
}
|
||||
|
||||
public void Handle(EpisodeGrabbedEvent message)
|
||||
|
@ -58,7 +58,7 @@ namespace NzbDrone.Core.History
|
|||
Indexer = message.ParseResult.Indexer,
|
||||
Quality = message.ParseResult.Quality,
|
||||
NzbTitle = message.ParseResult.OriginalString,
|
||||
Episode = episode,
|
||||
EpisodeId = episode.Id,
|
||||
NzbInfoUrl = message.ParseResult.NzbInfoUrl,
|
||||
ReleaseGroup = message.ParseResult.ReleaseGroup,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue