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

Fixed: Edition not Saving to DB due to missing Aggregator

This commit is contained in:
Qstick 2020-01-26 01:13:45 -05:00
parent fdd1167f33
commit 68bfd8bc25

View File

@ -0,0 +1,27 @@
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Parser.Model;
namespace NzbDrone.Core.MediaFiles.MovieImport.Aggregation.Aggregators
{
public class AggregateEdition : IAggregateLocalMovie
{
public LocalMovie Aggregate(LocalMovie localMovie, bool otherFiles)
{
var movieEdition = localMovie.DownloadClientMovieInfo?.Edition;
if (movieEdition.IsNullOrWhiteSpace())
{
movieEdition = localMovie.FolderMovieInfo?.Edition;
}
if (movieEdition.IsNullOrWhiteSpace())
{
movieEdition = localMovie.FileMovieInfo?.Edition;
}
localMovie.Edition = movieEdition;
return localMovie;
}
}
}