mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Fixed: (Hopefully) Bug where movie file was not correctly linked to movie.
This commit is contained in:
parent
3fb356ddb6
commit
67dd498576
@ -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.");
|
||||
}
|
||||
_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));
|
||||
|
||||
return addedFile;
|
||||
|
@ -359,7 +359,10 @@ public void RemoveAddOptions(Movie movie)
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user