New: Store FileId on Import History Events

This commit is contained in:
Qstick 2021-02-04 22:22:05 -05:00
parent 9b85f328a6
commit 35a53c5627
2 changed files with 2 additions and 3 deletions

View File

@ -197,8 +197,7 @@ namespace NzbDrone.Core.History
MovieId = movie.Id,
};
//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.ImportedMovie.Id.ToString());
history.Data.Add("DroppedPath", message.MovieInfo.Path);
history.Data.Add("ImportedPath", Path.Combine(movie.Path, message.ImportedMovie.RelativePath));
history.Data.Add("DownloadClient", message.DownloadClientInfo?.Type);

View File

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