mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-29 23:12:39 +01:00
New: Default name when adding providers
This commit is contained in:
parent
465a584486
commit
16d95ea6bf
@ -41,7 +41,7 @@ function EditSpecificationModalContent(props) {
|
||||
return (
|
||||
<ModalContent onModalClose={onCancelPress}>
|
||||
<ModalHeader>
|
||||
{`${id ? translate('EditCondition') : translate('AddCondition')} - ${implementationName}`}
|
||||
{id ? translate('EditConditionImplementation', { implementationName }) : translate('AddConditionImplementation', { implementationName })}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@ -58,7 +58,7 @@ class EditDownloadClientModalContent extends Component {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
{`${id ? translate('Edit') : translate('Add')} ${translate('DownloadClient')} - ${implementationName}`}
|
||||
{id ? translate('EditDownloadClientImplementation', { implementationName }) : translate('AddDownloadClientImplementation', { implementationName })}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@ -16,10 +16,12 @@ class AddImportListItem extends Component {
|
||||
|
||||
onImportListSelect = () => {
|
||||
const {
|
||||
implementation
|
||||
implementation,
|
||||
implementationName,
|
||||
minRefreshInterval
|
||||
} = this.props;
|
||||
|
||||
this.props.onImportListSelect({ implementation });
|
||||
this.props.onImportListSelect({ implementation, implementationName, minRefreshInterval });
|
||||
};
|
||||
|
||||
//
|
||||
@ -29,6 +31,7 @@ class AddImportListItem extends Component {
|
||||
const {
|
||||
implementation,
|
||||
implementationName,
|
||||
minRefreshInterval,
|
||||
infoLink,
|
||||
presets,
|
||||
onImportListSelect
|
||||
@ -56,7 +59,7 @@ class AddImportListItem extends Component {
|
||||
<span>
|
||||
<Button
|
||||
size={sizes.SMALL}
|
||||
onPress={this.onListSelect}
|
||||
onPress={this.onImportListSelect}
|
||||
>
|
||||
{translate('Custom')}
|
||||
</Button>
|
||||
@ -77,6 +80,8 @@ class AddImportListItem extends Component {
|
||||
key={preset.name}
|
||||
name={preset.name}
|
||||
implementation={implementation}
|
||||
implementationName={implementationName}
|
||||
minRefreshInterval={minRefreshInterval}
|
||||
onPress={onImportListSelect}
|
||||
/>
|
||||
);
|
||||
@ -103,6 +108,7 @@ class AddImportListItem extends Component {
|
||||
AddImportListItem.propTypes = {
|
||||
implementation: PropTypes.string.isRequired,
|
||||
implementationName: PropTypes.string.isRequired,
|
||||
minRefreshInterval: PropTypes.string.isRequired,
|
||||
infoLink: PropTypes.string.isRequired,
|
||||
presets: PropTypes.arrayOf(PropTypes.object),
|
||||
onImportListSelect: PropTypes.func.isRequired
|
||||
|
@ -49,8 +49,8 @@ class AddImportListModalContentConnector extends Component {
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onImportListSelect = ({ implementation, name }) => {
|
||||
this.props.selectImportListSchema({ implementation, presetName: name });
|
||||
onImportListSelect = ({ implementation, implementationName, name, minRefreshInterval }) => {
|
||||
this.props.selectImportListSchema({ implementation, implementationName, presetName: name, minRefreshInterval });
|
||||
this.props.onModalClose({ listSelected: true });
|
||||
};
|
||||
|
||||
|
@ -10,12 +10,16 @@ class AddImportListPresetMenuItem extends Component {
|
||||
onPress = () => {
|
||||
const {
|
||||
name,
|
||||
implementation
|
||||
implementation,
|
||||
implementationName,
|
||||
minRefreshInterval
|
||||
} = this.props;
|
||||
|
||||
this.props.onPress({
|
||||
name,
|
||||
implementation
|
||||
implementation,
|
||||
implementationName,
|
||||
minRefreshInterval
|
||||
});
|
||||
};
|
||||
|
||||
@ -26,6 +30,8 @@ class AddImportListPresetMenuItem extends Component {
|
||||
const {
|
||||
name,
|
||||
implementation,
|
||||
implementationName,
|
||||
minRefreshInterval,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
@ -43,6 +49,8 @@ class AddImportListPresetMenuItem extends Component {
|
||||
AddImportListPresetMenuItem.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
implementation: PropTypes.string.isRequired,
|
||||
implementationName: PropTypes.string.isRequired,
|
||||
minRefreshInterval: PropTypes.string.isRequired,
|
||||
onPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
@ -43,6 +43,7 @@ function EditImportListModalContent(props) {
|
||||
|
||||
const {
|
||||
id,
|
||||
implementationName,
|
||||
name,
|
||||
enableAutomaticAdd,
|
||||
minRefreshInterval,
|
||||
@ -58,7 +59,7 @@ function EditImportListModalContent(props) {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
{id ? translate('EditImportList') : translate('AddImportList')}
|
||||
{id ? translate('EditImportListImplementation', { implementationName }) : translate('AddImportListImplementation', { implementationName })}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@ -16,10 +16,11 @@ class AddIndexerItem extends Component {
|
||||
|
||||
onIndexerSelect = () => {
|
||||
const {
|
||||
implementation
|
||||
implementation,
|
||||
implementationName
|
||||
} = this.props;
|
||||
|
||||
this.props.onIndexerSelect({ implementation });
|
||||
this.props.onIndexerSelect({ implementation, implementationName });
|
||||
};
|
||||
|
||||
//
|
||||
@ -77,6 +78,7 @@ class AddIndexerItem extends Component {
|
||||
key={preset.name}
|
||||
name={preset.name}
|
||||
implementation={implementation}
|
||||
implementationName={implementationName}
|
||||
onPress={onIndexerSelect}
|
||||
/>
|
||||
);
|
||||
|
@ -48,8 +48,8 @@ class AddIndexerModalContentConnector extends Component {
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onIndexerSelect = ({ implementation, name }) => {
|
||||
this.props.selectIndexerSchema({ implementation, presetName: name });
|
||||
onIndexerSelect = ({ implementation, implementationName, name }) => {
|
||||
this.props.selectIndexerSchema({ implementation, implementationName, presetName: name });
|
||||
this.props.onModalClose({ indexerSelected: true });
|
||||
};
|
||||
|
||||
|
@ -10,12 +10,14 @@ class AddIndexerPresetMenuItem extends Component {
|
||||
onPress = () => {
|
||||
const {
|
||||
name,
|
||||
implementation
|
||||
implementation,
|
||||
implementationName
|
||||
} = this.props;
|
||||
|
||||
this.props.onPress({
|
||||
name,
|
||||
implementation
|
||||
implementation,
|
||||
implementationName
|
||||
});
|
||||
};
|
||||
|
||||
@ -26,6 +28,7 @@ class AddIndexerPresetMenuItem extends Component {
|
||||
const {
|
||||
name,
|
||||
implementation,
|
||||
implementationName,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
@ -43,6 +46,7 @@ class AddIndexerPresetMenuItem extends Component {
|
||||
AddIndexerPresetMenuItem.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
implementation: PropTypes.string.isRequired,
|
||||
implementationName: PropTypes.string.isRequired,
|
||||
onPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
@ -56,7 +56,7 @@ function EditIndexerModalContent(props) {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
{`${id ? translate('EditIndexer') : translate('AddIndexer')} - ${implementationName}`}
|
||||
{id ? translate('EditIndexerImplementation', { implementationName }) : translate('AddIndexerImplementation', { implementationName })}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@ -28,7 +28,7 @@ class AddNotificationModalContent extends Component {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
{translate('AddNotification')}
|
||||
{translate('AddConnection')}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@ -48,7 +48,7 @@ function EditNotificationModalContent(props) {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
{`${id ? translate('EditConnection') : translate('AddConnection')} - ${implementationName}`}
|
||||
{id ? translate('EditConnectionImplementation', { implementationName }) : translate('AddConnectionImplementation', { implementationName })}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@ -72,7 +72,7 @@ function EditSpecificationModalContent(props) {
|
||||
return (
|
||||
<ModalContent onModalClose={onCancelPress}>
|
||||
<ModalHeader>
|
||||
{`${id ? translate('EditCondition') : translate('AddCondition')} - ${implementationName}`}
|
||||
{id ? translate('EditConditionImplementation', { implementationName }) : translate('AddConditionImplementation', { implementationName })}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@ -117,6 +117,7 @@ export default {
|
||||
|
||||
[SELECT_DOWNLOAD_CLIENT_SCHEMA]: (state, { payload }) => {
|
||||
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
||||
selectedSchema.name = selectedSchema.implementationName;
|
||||
selectedSchema.enable = true;
|
||||
|
||||
return selectedSchema;
|
||||
|
@ -116,10 +116,14 @@ export default {
|
||||
|
||||
[SELECT_IMPORT_LIST_SCHEMA]: (state, { payload }) => {
|
||||
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
||||
selectedSchema.name = payload.presetName ?? payload.implementationName;
|
||||
selectedSchema.implementationName = payload.implementationName;
|
||||
selectedSchema.minRefreshInterval = payload.minRefreshInterval;
|
||||
selectedSchema.enableAutomaticAdd = true;
|
||||
selectedSchema.shouldMonitor = 'all';
|
||||
selectedSchema.seriesType = 'standard';
|
||||
selectedSchema.seasonFolder = true;
|
||||
selectedSchema.rootFolderPath = '';
|
||||
|
||||
return selectedSchema;
|
||||
});
|
||||
|
@ -121,6 +121,8 @@ export default {
|
||||
|
||||
[SELECT_INDEXER_SCHEMA]: (state, { payload }) => {
|
||||
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
||||
selectedSchema.name = payload.presetName ?? payload.implementationName;
|
||||
selectedSchema.implementationName = payload.implementationName;
|
||||
selectedSchema.enableRss = selectedSchema.supportsRss;
|
||||
selectedSchema.enableAutomaticSearch = selectedSchema.supportsSearch;
|
||||
selectedSchema.enableInteractiveSearch = selectedSchema.supportsSearch;
|
||||
|
@ -102,6 +102,7 @@ export default {
|
||||
|
||||
[SELECT_NOTIFICATION_SCHEMA]: (state, { payload }) => {
|
||||
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
||||
selectedSchema.name = selectedSchema.implementationName;
|
||||
selectedSchema.onGrab = selectedSchema.supportsOnGrab;
|
||||
selectedSchema.onDownload = selectedSchema.supportsOnDownload;
|
||||
selectedSchema.onUpgrade = selectedSchema.supportsOnUpgrade;
|
||||
|
@ -44,7 +44,6 @@ namespace NzbDrone.Core.ImportLists
|
||||
|
||||
yield return new ImportListDefinition
|
||||
{
|
||||
Name = GetType().Name,
|
||||
EnableAutomaticAdd = config.Validate().IsValid,
|
||||
Implementation = GetType().Name,
|
||||
Settings = config
|
||||
|
@ -11,19 +11,24 @@
|
||||
"AddAutoTagError": "Unable to add a new auto tag, please try again.",
|
||||
"AddCondition": "Add Condition",
|
||||
"AddConditionError": "Unable to add a new condition, please try again.",
|
||||
"AddConditionImplementation": "Add Condition - {implementationName}",
|
||||
"AddConnection": "Add Connection",
|
||||
"AddConnectionImplementation": "Add Connection - {implementationName}",
|
||||
"AddCustomFilter": "Add Custom Filter",
|
||||
"AddCustomFormat": "Add Custom Format",
|
||||
"AddCustomFormatError": "Unable to add a new custom format, please try again.",
|
||||
"AddDelayProfile": "Add Delay Profile",
|
||||
"AddDownloadClient": "Add Download Client",
|
||||
"AddDownloadClientError": "Unable to add a new download client, please try again.",
|
||||
"AddDownloadClientImplementation": "Add Download Client - {implementationName}",
|
||||
"AddExclusion": "Add Exclusion",
|
||||
"AddImportList": "Add Import List",
|
||||
"AddImportListExclusion": "Add Import List Exclusion",
|
||||
"AddImportListExclusionError": "Unable to add a new import list exclusion, please try again.",
|
||||
"AddImportListImplementation": "Add Import List - {implementationName}",
|
||||
"AddIndexer": "Add Indexer",
|
||||
"AddIndexerError": "Unable to add a new indexer, please try again.",
|
||||
"AddIndexerImplementation": "Add Indexer - {implementationName}",
|
||||
"AddList": "Add List",
|
||||
"AddListError": "Unable to add a new list, please try again.",
|
||||
"AddListExclusionError": "Unable to add a new list exclusion, please try again.",
|
||||
@ -35,7 +40,6 @@
|
||||
"AddNewSeriesRootFolderHelpText": "'{folder}' subfolder will be created automatically",
|
||||
"AddNewSeriesSearchForCutoffUnmetEpisodes": "Start search for cutoff unmet episodes",
|
||||
"AddNewSeriesSearchForMissingEpisodes": "Start search for missing episodes",
|
||||
"AddNotification": "Add Notification",
|
||||
"AddNotificationError": "Unable to add a new notification, please try again.",
|
||||
"AddQualityProfile": "Add Quality Profile",
|
||||
"AddQualityProfileError": "Unable to add a new quality profile, please try again.",
|
||||
@ -329,14 +333,15 @@
|
||||
"Duration": "Duration",
|
||||
"Edit": "Edit",
|
||||
"EditAutoTag": "Edit Auto Tag",
|
||||
"EditCondition": "Edit Condition",
|
||||
"EditConnection": "Edit Connection",
|
||||
"EditConditionImplementation": "Edit Condition - {implementationName}",
|
||||
"EditConnectionImplementation": "Edit Connection - {implementationName}",
|
||||
"EditCustomFormat": "Edit Custom Format",
|
||||
"EditDelayProfile": "Edit Delay Profile",
|
||||
"EditDownloadClientImplementation": "Edit Download Client - {implementationName}",
|
||||
"EditGroups": "Edit Groups",
|
||||
"EditImportList": "Edit Import List",
|
||||
"EditImportListExclusion": "Edit Import List Exclusion",
|
||||
"EditIndexer": "Edit Indexer",
|
||||
"EditImportListImplementation": "Edit Import List - {implementationName}",
|
||||
"EditIndexerImplementation": "Edit Indexer - {implementationName}",
|
||||
"EditListExclusion": "Edit List Exclusion",
|
||||
"EditMetadata": "Edit {metadataType} Metadata",
|
||||
"EditQualityProfile": "Edit Quality Profile",
|
||||
|
Loading…
Reference in New Issue
Block a user