mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
Fixed an issue where an unloaded movie could case linking to fail.
This commit is contained in:
parent
3a4b01cf6f
commit
8b9d0f7b19
1 changed files with 1 additions and 0 deletions
|
@ -146,6 +146,7 @@ namespace NzbDrone.Core.MediaFiles
|
||||||
public MovieFile Add(MovieFile episodeFile)
|
public MovieFile Add(MovieFile episodeFile)
|
||||||
{
|
{
|
||||||
var addedFile = _movieFileRepository.Insert(episodeFile);
|
var addedFile = _movieFileRepository.Insert(episodeFile);
|
||||||
|
episodeFile.Movie.LazyLoad();
|
||||||
_movieService.SetFileId(episodeFile.Movie.Value, episodeFile); //Should not be necessary, but sometimes below fails?
|
_movieService.SetFileId(episodeFile.Movie.Value, episodeFile); //Should not be necessary, but sometimes below fails?
|
||||||
_eventAggregator.PublishEvent(new MovieFileAddedEvent(addedFile));
|
_eventAggregator.PublishEvent(new MovieFileAddedEvent(addedFile));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue