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