mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 16:43:58 -07:00
New: Health check for import lists with missing root folders
New: Show missing root folder path in edit for Import List (cherry picked from commit ae196af2ad368d49fde2358f0987ed7650c7f29c) Closes #1998
This commit is contained in:
parent
af1e2fe2eb
commit
bfb86dafc9
8 changed files with 127 additions and 7 deletions
|
@ -9,14 +9,17 @@ const ADD_NEW_KEY = 'addNew';
|
|||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
(state) => state.settings.rootFolders,
|
||||
(state, { value }) => value,
|
||||
(state, { includeMissingValue }) => includeMissingValue,
|
||||
(state, { includeNoChange }) => includeNoChange,
|
||||
(rootFolders, includeNoChange) => {
|
||||
(rootFolders, value, includeMissingValue, includeNoChange) => {
|
||||
const values = rootFolders.items.map((rootFolder) => {
|
||||
return {
|
||||
key: rootFolder.path,
|
||||
value: rootFolder.path,
|
||||
name: rootFolder.name,
|
||||
freeSpace: rootFolder.freeSpace
|
||||
freeSpace: rootFolder.freeSpace,
|
||||
isMissing: false
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -25,6 +28,16 @@ function createMapStateToProps() {
|
|||
key: 'noChange',
|
||||
value: '',
|
||||
name: 'No Change',
|
||||
isDisabled: true,
|
||||
isMissing: false
|
||||
});
|
||||
}
|
||||
|
||||
if (includeMissingValue && !values.find((v) => v.key === value)) {
|
||||
values.push({
|
||||
key: value,
|
||||
value,
|
||||
isMissing: true,
|
||||
isDisabled: true
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue