1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

New: Add FileId to History data for import events

This commit is contained in:
Mark McDowall 2021-02-04 20:11:48 -08:00
parent 577604fccc
commit 952a7248c9
2 changed files with 2 additions and 3 deletions

View File

@ -211,8 +211,7 @@ public void Handle(EpisodeImportedEvent message)
Language = message.EpisodeInfo.Language
};
//Won't have a value since we publish this event before saving to DB.
//history.Data.Add("FileId", message.ImportedEpisode.Id.ToString());
history.Data.Add("FileId", message.ImportedEpisode.Id.ToString());
history.Data.Add("DroppedPath", message.EpisodeInfo.Path);
history.Data.Add("ImportedPath", Path.Combine(message.EpisodeInfo.Series.Path, message.ImportedEpisode.RelativePath));
history.Data.Add("DownloadClient", message.DownloadClientInfo?.Type);

View File

@ -124,7 +124,7 @@ public List<ImportResult> Import(List<ImportDecision> decisions, bool newDownloa
}
}
_mediaFileService.Add(episodeFile);
episodeFile = _mediaFileService.Add(episodeFile);
importResults.Add(new ImportResult(importDecision));
if (newDownload)