[WIP] Additions to custom formats, such as rescanning old files. (#2949)

This commit is contained in:
Leonardo Galli
2018-09-10 21:25:10 +02:00
committed by GitHub
parent 1059e145c3
commit b4f456d5f0
65 changed files with 1322 additions and 3766 deletions

View File

@@ -25,6 +25,8 @@ namespace NzbDrone.Core.History
History Get(int historyId);
List<History> Find(string downloadId, HistoryEventType eventType);
List<History> FindByDownloadId(string downloadId);
List<History> FindByMovieId(int movieId);
void UpdateMany(List<History> toUpdate);
}
public class HistoryService : IHistoryService,
@@ -73,6 +75,11 @@ namespace NzbDrone.Core.History
return _historyRepository.FindByDownloadId(downloadId);
}
public List<History> FindByMovieId(int movieId)
{
return _historyRepository.FindByMovieId(movieId);
}
public QualityModel GetBestQualityInHistory(Profile profile, int movieId)
{
var comparer = new QualityModelComparer(profile);
@@ -81,6 +88,11 @@ namespace NzbDrone.Core.History
.FirstOrDefault();
}
public void UpdateMany(List<History> toUpdate)
{
_historyRepository.UpdateMany(toUpdate);
}
public void Handle(MovieGrabbedEvent message)
{
var history = new History