New: Default name when adding providers

(cherry picked from commit 16d95ea6bf3d9340845fee19904a2d48616be8dc)

Closes #4007
This commit is contained in:
Bogdan 2023-08-14 02:27:59 +03:00
commit c88d64a9ac
19 changed files with 61 additions and 26 deletions

View file

@ -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;

View file

@ -117,8 +117,12 @@ 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 = 'entireArtist';
selectedSchema.rootFolderPath = '';
return selectedSchema;
});

View file

@ -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;

View file

@ -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.onReleaseImport = selectedSchema.supportsOnReleaseImport;
selectedSchema.onUpgrade = selectedSchema.supportsOnUpgrade;