mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-24 14:37:07 -04:00
Fix editing import lists
This commit is contained in:
parent
0694f2fa76
commit
ee8aaadb29
3 changed files with 9 additions and 21 deletions
|
@ -76,7 +76,6 @@ import {
|
|||
cancelFetchReleases,
|
||||
clearReleases,
|
||||
} from 'Store/Actions/releaseActions';
|
||||
import { fetchRootFolders } from 'Store/Actions/rootFolderActions';
|
||||
import { fetchImportListSchema } from 'Store/Actions/Settings/importLists';
|
||||
import createAllMoviesSelector from 'Store/Selectors/createAllMoviesSelector';
|
||||
import createCommandsSelector from 'Store/Selectors/createCommandsSelector';
|
||||
|
@ -466,7 +465,6 @@ function MovieDetails({ movieId }: MovieDetailsProps) {
|
|||
dispatch(fetchMovieCredits({ movieId }));
|
||||
dispatch(fetchQueueDetails({ movieId }));
|
||||
dispatch(fetchImportListSchema());
|
||||
dispatch(fetchRootFolders());
|
||||
}, [movieId, dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -27,7 +27,6 @@ function EditImportListModalContent(props) {
|
|||
advancedSettings,
|
||||
isFetching,
|
||||
error,
|
||||
rootFolderError,
|
||||
isSaving,
|
||||
isTesting,
|
||||
saveError,
|
||||
|
@ -67,12 +66,13 @@ function EditImportListModalContent(props) {
|
|||
|
||||
<ModalBody>
|
||||
{
|
||||
isFetching &&
|
||||
<LoadingIndicator />
|
||||
isFetching ?
|
||||
<LoadingIndicator /> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
!isFetching && (!!error || !!rootFolderError) ?
|
||||
!isFetching && !!error ?
|
||||
<Alert kind={kinds.DANGER}>
|
||||
{translate('AddListError')}
|
||||
</Alert> :
|
||||
|
@ -80,7 +80,7 @@ function EditImportListModalContent(props) {
|
|||
}
|
||||
|
||||
{
|
||||
!isFetching && !error && !rootFolderError &&
|
||||
!isFetching && !error ?
|
||||
<Form
|
||||
{...otherProps}
|
||||
>
|
||||
|
@ -240,7 +240,8 @@ function EditImportListModalContent(props) {
|
|||
})
|
||||
}
|
||||
|
||||
</Form>
|
||||
</Form> :
|
||||
null
|
||||
}
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
|
@ -291,7 +292,6 @@ EditImportListModalContent.propTypes = {
|
|||
advancedSettings: PropTypes.bool.isRequired,
|
||||
isFetching: PropTypes.bool.isRequired,
|
||||
error: PropTypes.object,
|
||||
rootFolderError: PropTypes.object,
|
||||
isSaving: PropTypes.bool.isRequired,
|
||||
isTesting: PropTypes.bool.isRequired,
|
||||
saveError: PropTypes.object,
|
||||
|
|
|
@ -15,21 +15,11 @@ import EditImportListModalContent from './EditImportListModalContent';
|
|||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
(state) => state.settings.advancedSettings,
|
||||
(state) => state.rootFolders,
|
||||
createProviderSettingsSelector('importLists'),
|
||||
(advancedSettings, rootFolders, importList) => {
|
||||
const {
|
||||
isFetching,
|
||||
isPopulated,
|
||||
...otherProps
|
||||
} = importList;
|
||||
|
||||
(advancedSettings, importList) => {
|
||||
return {
|
||||
advancedSettings,
|
||||
isFetching: rootFolders.isFetching || isFetching,
|
||||
isPopulated: rootFolders.isPopulated && isPopulated,
|
||||
rootFolderError: rootFolders.error,
|
||||
...otherProps
|
||||
...importList
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue