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

Fixed an issue where an unloaded movie could case linking to fail.

This commit is contained in:
Leonardo Galli 2017-02-25 13:51:52 +01:00
parent 3a4b01cf6f
commit 8b9d0f7b19

View File

@ -146,6 +146,7 @@ public void HandleAsync(SeriesDeletedEvent message)
public MovieFile Add(MovieFile episodeFile)
{
var addedFile = _movieFileRepository.Insert(episodeFile);
episodeFile.Movie.LazyLoad();
_movieService.SetFileId(episodeFile.Movie.Value, episodeFile); //Should not be necessary, but sometimes below fails?
_eventAggregator.PublishEvent(new MovieFileAddedEvent(addedFile));