From e31f2ad2536fd0ab868a9a22f3bf0c2c0b8a37f4 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sun, 30 Jun 2024 05:35:37 +0300 Subject: [PATCH] Fixed: Validate metadata and quality profiles for root folders Don't allow `0` as possible value for metadata and quality profiles, and permit to edit root folders with bad values in UI. --- .../ImportLists/Manage/ManageImportListsModalRow.tsx | 5 +++-- .../src/Settings/MediaManagement/RootFolder/RootFolder.js | 8 ++++---- src/Lidarr.Api.V1/RootFolders/RootFolderController.cs | 6 ++++-- .../Validation/QualityProfileExistsValidator.cs | 8 ++++---- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/frontend/src/Settings/ImportLists/ImportLists/Manage/ManageImportListsModalRow.tsx b/frontend/src/Settings/ImportLists/ImportLists/Manage/ManageImportListsModalRow.tsx index 410e626e2..095ac7c03 100644 --- a/frontend/src/Settings/ImportLists/ImportLists/Manage/ManageImportListsModalRow.tsx +++ b/frontend/src/Settings/ImportLists/ImportLists/Manage/ManageImportListsModalRow.tsx @@ -7,6 +7,7 @@ import TableRow from 'Components/Table/TableRow'; import TagListConnector from 'Components/TagListConnector'; import { createQualityProfileSelectorForHook } from 'Store/Selectors/createQualityProfileSelector'; import { SelectStateInputProps } from 'typings/props'; +import translate from 'Utilities/String/translate'; import styles from './ManageImportListsModalRow.css'; interface ManageImportListsModalRowProps { @@ -63,7 +64,7 @@ function ManageImportListsModalRow(props: ManageImportListsModalRowProps) { - {qualityProfile?.name ?? 'None'} + {qualityProfile?.name ?? translate('None')} @@ -71,7 +72,7 @@ function ManageImportListsModalRow(props: ManageImportListsModalRowProps) { - {enableAutomaticAdd ? 'Yes' : 'No'} + {enableAutomaticAdd ? translate('Yes') : translate('No')} diff --git a/frontend/src/Settings/MediaManagement/RootFolder/RootFolder.js b/frontend/src/Settings/MediaManagement/RootFolder/RootFolder.js index 20cefc53f..47e5dfcf1 100644 --- a/frontend/src/Settings/MediaManagement/RootFolder/RootFolder.js +++ b/frontend/src/Settings/MediaManagement/RootFolder/RootFolder.js @@ -75,12 +75,12 @@ class RootFolder extends Component { {path} -