Fixed: Edition not Saving to DB due to missing Aggregator

pull/4107/head
Qstick 5 years ago
parent fdd1167f33
commit 68bfd8bc25

@ -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;
}
}
}
Loading…
Cancel
Save