mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 04:21:27 +02:00
Updated migration to attempt associate old grabbed & imported events and associate drone factory imports during CompletedDownloadHandling.
This commit is contained in:
@@ -25,6 +25,7 @@ namespace NzbDrone.Core.History
|
||||
History MostRecentForEpisode(int episodeId);
|
||||
History Get(int id);
|
||||
List<History> FindBySourceTitle(string sourceTitle);
|
||||
void UpdateHistoryData(Int32 historyId, Dictionary<String, String> data);
|
||||
}
|
||||
|
||||
public class HistoryService : IHistoryService, IHandle<EpisodeGrabbedEvent>, IHandle<EpisodeImportedEvent>, IHandle<DownloadFailedEvent>
|
||||
@@ -101,6 +102,13 @@ namespace NzbDrone.Core.History
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public void UpdateHistoryData(Int32 historyId, Dictionary<String, String> data)
|
||||
{
|
||||
var history = _historyRepository.Get(historyId);
|
||||
history.Data = data;
|
||||
_historyRepository.Update(history);
|
||||
}
|
||||
|
||||
public void Handle(EpisodeGrabbedEvent message)
|
||||
{
|
||||
foreach (var episode in message.Episode.Episodes)
|
||||
|
Reference in New Issue
Block a user