enabled and indexerId placeholder
This commit is contained in:
parent
31cff12e43
commit
5cb1896af0
|
@ -30,7 +30,7 @@ function EditReleaseProfileModalContent(props) {
|
|||
|
||||
const {
|
||||
id,
|
||||
enableProfile,
|
||||
enabled,
|
||||
required,
|
||||
ignored,
|
||||
preferred,
|
||||
|
@ -52,9 +52,9 @@ function EditReleaseProfileModalContent(props) {
|
|||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="enableProfile"
|
||||
name="enabled"
|
||||
helpText="Check to enable release profile"
|
||||
{...enableProfile}
|
||||
{...enabled}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
|
|
@ -8,10 +8,12 @@ import { setReleaseProfileValue, saveReleaseProfile } from 'Store/Actions/settin
|
|||
import EditReleaseProfileModalContent from './EditReleaseProfileModalContent';
|
||||
|
||||
const newReleaseProfile = {
|
||||
enabled: false,
|
||||
required: '',
|
||||
ignored: '',
|
||||
preferred: [],
|
||||
includePreferredWhenRenaming: false,
|
||||
indexer: 0,
|
||||
tags: []
|
||||
};
|
||||
|
||||
|
|
|
@ -30,7 +30,15 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
|||
_logger.Debug("Checking if release meets restrictions: {0}", subject);
|
||||
|
||||
var title = subject.Release.Title;
|
||||
var restrictions = _releaseProfileService.AllForTags(subject.Series.Tags);
|
||||
List<ReleaseProfile> restrictions = _releaseProfileService.AllForTags(subject.Series.Tags);
|
||||
|
||||
foreach (ReleaseProfile restriction in restrictions)
|
||||
{
|
||||
// TODO: attach Enabled and IndexerId fields to restriction
|
||||
/*if (!restriction.Enabled || restriction.IndexerId != subject.Release.IndexerId)
|
||||
{
|
||||
continue;
|
||||
}*/
|
||||
|
||||
var required = restrictions.Where(r => r.Required.IsNotNullOrWhiteSpace());
|
||||
var ignored = restrictions.Where(r => r.Ignored.IsNotNullOrWhiteSpace());
|
||||
|
@ -60,7 +68,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
|||
return Decision.Reject("Contains these ignored terms: {0}", terms);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
_logger.Debug("[{0}] No restrictions apply, allowing", subject);
|
||||
return Decision.Accept();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue