mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
[WIP] Additions to custom formats, such as rescanning old files. (#2949)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user