mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
@@ -2,8 +2,8 @@ using System;
|
||||
using NLog;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using System.Linq;
|
||||
using NzbDrone.Common.Extensions;
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
{
|
||||
@@ -21,7 +21,18 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteAlbum subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
if (subject.ParsedAlbumInfo.Discography)
|
||||
{
|
||||
_logger.Debug("Checking if all albums in discography release have released. {0}", subject.Release.Title);
|
||||
|
||||
if (subject.Albums.Any(e => !e.ReleaseDate.HasValue || e.ReleaseDate.Value.After(DateTime.UtcNow)))
|
||||
{
|
||||
_logger.Debug("Discography release {0} rejected. All albums haven't released yet.", subject.Release.Title);
|
||||
return Decision.Reject("Discography release rejected. All albums haven't released yet.");
|
||||
}
|
||||
}
|
||||
|
||||
return Decision.Accept();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user