mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-22 07:42:28 +00:00
Add Monitor New Items to artists select edit
This commit is contained in:
parent
57206da77b
commit
093d6c3c26
1 changed files with 25 additions and 0 deletions
|
@ -14,6 +14,7 @@ import styles from './EditArtistModalContent.css';
|
|||
|
||||
interface SavePayload {
|
||||
monitored?: boolean;
|
||||
monitorNewItems?: string;
|
||||
qualityProfileId?: number;
|
||||
metadataProfileId?: number;
|
||||
rootFolderPath?: string;
|
||||
|
@ -54,6 +55,7 @@ function EditArtistModalContent(props: EditArtistModalContentProps) {
|
|||
const { artistIds, onSavePress, onModalClose } = props;
|
||||
|
||||
const [monitored, setMonitored] = useState(NO_CHANGE);
|
||||
const [monitorNewItems, setMonitorNewItems] = useState(NO_CHANGE);
|
||||
const [qualityProfileId, setQualityProfileId] = useState<string | number>(
|
||||
NO_CHANGE
|
||||
);
|
||||
|
@ -73,6 +75,11 @@ function EditArtistModalContent(props: EditArtistModalContentProps) {
|
|||
payload.monitored = monitored === 'monitored';
|
||||
}
|
||||
|
||||
if (monitorNewItems !== NO_CHANGE) {
|
||||
hasChanges = true;
|
||||
payload.monitorNewItems = monitorNewItems;
|
||||
}
|
||||
|
||||
if (qualityProfileId !== NO_CHANGE) {
|
||||
hasChanges = true;
|
||||
payload.qualityProfileId = qualityProfileId as number;
|
||||
|
@ -97,6 +104,7 @@ function EditArtistModalContent(props: EditArtistModalContentProps) {
|
|||
},
|
||||
[
|
||||
monitored,
|
||||
monitorNewItems,
|
||||
qualityProfileId,
|
||||
metadataProfileId,
|
||||
rootFolderPath,
|
||||
|
@ -111,6 +119,9 @@ function EditArtistModalContent(props: EditArtistModalContentProps) {
|
|||
case 'monitored':
|
||||
setMonitored(value);
|
||||
break;
|
||||
case 'monitorNewItems':
|
||||
setMonitorNewItems(value);
|
||||
break;
|
||||
case 'qualityProfileId':
|
||||
setQualityProfileId(value);
|
||||
break;
|
||||
|
@ -168,6 +179,20 @@ function EditArtistModalContent(props: EditArtistModalContentProps) {
|
|||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>{translate('MonitorNewItems')}</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.MONITOR_NEW_ITEMS_SELECT}
|
||||
name="monitorNewItems"
|
||||
value={monitorNewItems}
|
||||
includeNoChange={true}
|
||||
includeNoChangeDisabled={false}
|
||||
onChange={onInputChange}
|
||||
helpText={translate('MonitorNewItemsHelpText')}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>{translate('QualityProfile')}</FormLabel>
|
||||
|
||||
|
|
Loading…
Reference in a new issue