1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Better name from LocalEpisode in EpisodeImportedEvent

This commit is contained in:
Mark McDowall 2013-10-17 18:28:30 -07:00
parent 3586d59d6c
commit e7780af212
2 changed files with 6 additions and 6 deletions

View File

@ -81,13 +81,13 @@ public void Handle(EpisodeGrabbedEvent message)
public void Handle(EpisodeImportedEvent message)
{
foreach (var episode in message.DroppedEpisode.Episodes)
foreach (var episode in message.EpisodeInfo.Episodes)
{
var history = new History
{
EventType = HistoryEventType.DownloadFolderImported,
Date = DateTime.UtcNow,
Quality = message.DroppedEpisode.Quality,
Quality = message.EpisodeInfo.Quality,
SourceTitle = message.ImportedEpisode.SceneName,
SeriesId = message.ImportedEpisode.SeriesId,
EpisodeId = episode.Id
@ -95,7 +95,7 @@ public void Handle(EpisodeImportedEvent message)
//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("DroppedPath", message.DroppedEpisode.Path);
history.Data.Add("DroppedPath", message.EpisodeInfo.Path);
history.Data.Add("ImportedPath", message.ImportedEpisode.Path);
_historyRepository.Insert(history);

View File

@ -5,12 +5,12 @@ namespace NzbDrone.Core.MediaFiles.Events
{
public class EpisodeImportedEvent : IEvent
{
public LocalEpisode DroppedEpisode { get; private set; }
public LocalEpisode EpisodeInfo { get; private set; }
public EpisodeFile ImportedEpisode { get; private set; }
public EpisodeImportedEvent(LocalEpisode droppedEpisode, EpisodeFile importedEpisode)
public EpisodeImportedEvent(LocalEpisode episodeInfo, EpisodeFile importedEpisode)
{
DroppedEpisode = droppedEpisode;
EpisodeInfo = episodeInfo;
ImportedEpisode = importedEpisode;
}
}