mirror of
https://github.com/Radarr/Radarr
synced 2025-02-24 15:21:28 +00:00
Fixed: (Hopefully) Bug where movie file was not correctly linked to movie.
This commit is contained in:
parent
3fb356ddb6
commit
67dd498576
2 changed files with 5 additions and 2 deletions
|
@ -151,7 +151,7 @@ public MovieFile Add(MovieFile episodeFile)
|
||||||
{
|
{
|
||||||
_logger.Error("Movie is null for the file {0}. Please run the houskeeping command to ensure movies and files are linked correctly.");
|
_logger.Error("Movie is null for the file {0}. Please run the houskeeping command to ensure movies and files are linked correctly.");
|
||||||
}
|
}
|
||||||
_movieService.SetFileId(addedFile.Movie.Value, addedFile); //Should not be necessary, but sometimes below fails?
|
//_movieService.SetFileId(addedFile.Movie.Value, addedFile); //Should not be necessary, but sometimes below fails?
|
||||||
_eventAggregator.PublishEvent(new MovieFileAddedEvent(addedFile));
|
_eventAggregator.PublishEvent(new MovieFileAddedEvent(addedFile));
|
||||||
|
|
||||||
return addedFile;
|
return addedFile;
|
||||||
|
|
|
@ -359,7 +359,10 @@ public void RemoveAddOptions(Movie movie)
|
||||||
|
|
||||||
public void Handle(MovieFileAddedEvent message)
|
public void Handle(MovieFileAddedEvent message)
|
||||||
{
|
{
|
||||||
_movieRepository.SetFileId(message.MovieFile.Id, message.MovieFile.Movie.Value.Id);
|
var movie = message.MovieFile.Movie.Value;
|
||||||
|
movie.MovieFileId = message.MovieFile.Id;
|
||||||
|
_movieRepository.Update(movie);
|
||||||
|
//_movieRepository.SetFileId(message.MovieFile.Id, message.MovieFile.Movie.Value.Id);
|
||||||
_logger.Info("Linking [{0}] > [{1}]", message.MovieFile.RelativePath, message.MovieFile.Movie.Value);
|
_logger.Info("Linking [{0}] > [{1}]", message.MovieFile.RelativePath, message.MovieFile.Movie.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue