New: Store FileId on Import History Events

pull/5870/head
Qstick 4 years ago
parent 9b85f328a6
commit 35a53c5627

@ -197,8 +197,7 @@ namespace NzbDrone.Core.History
MovieId = movie.Id, MovieId = movie.Id,
}; };
//Won't have a value since we publish this event before saving to DB. history.Data.Add("FileId", message.ImportedMovie.Id.ToString());
//history.Data.Add("FileId", message.ImportedEpisode.Id.ToString());
history.Data.Add("DroppedPath", message.MovieInfo.Path); history.Data.Add("DroppedPath", message.MovieInfo.Path);
history.Data.Add("ImportedPath", Path.Combine(movie.Path, message.ImportedMovie.RelativePath)); history.Data.Add("ImportedPath", Path.Combine(movie.Path, message.ImportedMovie.RelativePath));
history.Data.Add("DownloadClient", message.DownloadClientInfo?.Type); history.Data.Add("DownloadClient", message.DownloadClientInfo?.Type);

@ -128,7 +128,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport
movieFile.RelativePath = localMovie.Movie.Path.GetRelativePath(movieFile.Path); movieFile.RelativePath = localMovie.Movie.Path.GetRelativePath(movieFile.Path);
} }
_mediaFileService.Add(movieFile); movieFile = _mediaFileService.Add(movieFile);
importResults.Add(new ImportResult(importDecision)); importResults.Add(new ImportResult(importDecision));
if (newDownload) if (newDownload)

Loading…
Cancel
Save