New: (UI) Added `Monitor New Albums` to mass editor

Fixes #3894
pull/3903/head
Bogdan 1 year ago
parent 7b01c85c76
commit cc3667ed13

@ -6,6 +6,7 @@ import TableRowCell from 'Components/Table/Cells/TableRowCell';
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
import TableRow from 'Components/Table/TableRow';
import TagListConnector from 'Components/TagListConnector';
import monitorNewItemsOptions from 'Utilities/Artist/monitorNewItemsOptions';
import formatBytes from 'Utilities/Number/formatBytes';
class ArtistEditorRow extends Component {
@ -21,6 +22,7 @@ class ArtistEditorRow extends Component {
artistName,
artistType,
monitored,
monitorNewItems,
metadataProfile,
qualityProfile,
path,
@ -33,6 +35,8 @@ class ArtistEditorRow extends Component {
onSelectedChange
} = this.props;
const monitorNewItemsName = monitorNewItemsOptions.find((o) => o.key === monitorNewItems)?.value;
return (
<TableRow>
<TableSelectCell
@ -78,6 +82,14 @@ class ArtistEditorRow extends Component {
);
}
if (name === 'monitorNewItems') {
return (
<TableRowCell key={name}>
{monitorNewItemsName ?? 'Unknown'}
</TableRowCell>
);
}
if (name === 'qualityProfileId') {
return (
<TableRowCell key={name}>
@ -135,6 +147,7 @@ ArtistEditorRow.propTypes = {
artistName: PropTypes.string.isRequired,
artistType: PropTypes.string,
monitored: PropTypes.bool.isRequired,
monitorNewItems: PropTypes.string.isRequired,
metadataProfile: PropTypes.object.isRequired,
qualityProfile: PropTypes.object.isRequired,
path: PropTypes.string.isRequired,

@ -46,6 +46,12 @@ export const defaultState = {
isSortable: true,
isVisible: true
},
{
name: 'monitorNewItems',
label: translate('MonitorNewItems'),
isSortable: true,
isVisible: true
},
{
name: 'qualityProfileId',
label: translate('QualityProfile'),

@ -1,7 +1,9 @@
import translate from 'Utilities/String/translate';
const monitorNewItemsOptions = [
{ key: 'all', value: 'All Albums' },
{ key: 'none', value: 'None' },
{ key: 'new', value: 'New' }
{ key: 'all', value: translate('AllAlbums') },
{ key: 'none', value: translate('None') },
{ key: 'new', value: translate('New') }
];
export default monitorNewItemsOptions;

Loading…
Cancel
Save