mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-25 22:37:27 -04:00
New: Reprocess Language in Manual Import after Movie Selection
This commit is contained in:
@@ -14,3 +14,10 @@
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.reprocessing {
|
||||
composes: loading from '~Components/Loading/LoadingIndicator.css';
|
||||
|
||||
margin-top: 0;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import Icon from 'Components/Icon';
|
||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import TableRowCellButton from 'Components/Table/Cells/TableRowCellButton';
|
||||
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
||||
@@ -137,6 +138,7 @@ class InteractiveImportRow extends Component {
|
||||
languages,
|
||||
size,
|
||||
rejections,
|
||||
isReprocessing,
|
||||
isSelected,
|
||||
onSelectedChange
|
||||
} = this.props;
|
||||
@@ -151,7 +153,7 @@ class InteractiveImportRow extends Component {
|
||||
|
||||
const showMoviePlaceholder = isSelected && !movie;
|
||||
const showQualityPlaceholder = isSelected && !quality;
|
||||
const showLanguagePlaceholder = isSelected && !languages;
|
||||
const showLanguagePlaceholder = isSelected && !languages && !isReprocessing;
|
||||
|
||||
return (
|
||||
<TableRow>
|
||||
@@ -208,11 +210,20 @@ class InteractiveImportRow extends Component {
|
||||
}
|
||||
|
||||
{
|
||||
!showLanguagePlaceholder && !!languages &&
|
||||
!showLanguagePlaceholder && !!languages && !isReprocessing ?
|
||||
<MovieLanguage
|
||||
className={styles.label}
|
||||
languages={languages}
|
||||
/>
|
||||
/> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
isReprocessing ?
|
||||
<LoadingIndicator className={styles.reprocessing}
|
||||
size={20}
|
||||
|
||||
/> : null
|
||||
}
|
||||
</TableRowCellButton>
|
||||
|
||||
@@ -286,6 +297,7 @@ InteractiveImportRow.propTypes = {
|
||||
languages: PropTypes.arrayOf(PropTypes.object),
|
||||
size: PropTypes.number.isRequired,
|
||||
rejections: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
isReprocessing: PropTypes.bool,
|
||||
isSelected: PropTypes.bool,
|
||||
onSelectedChange: PropTypes.func.isRequired,
|
||||
onValidRowChange: PropTypes.func.isRequired
|
||||
|
||||
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import { updateInteractiveImportItem } from 'Store/Actions/interactiveImportActions';
|
||||
import { reprocessInteractiveImportItems, updateInteractiveImportItem } from 'Store/Actions/interactiveImportActions';
|
||||
import createAllMoviesSelector from 'Store/Selectors/createAllMoviesSelector';
|
||||
import createDeepEqualSelector from 'Store/Selectors/createDeepEqualSelector';
|
||||
import SelectMovieModalContent from './SelectMovieModalContent';
|
||||
@@ -59,6 +59,7 @@ function createMapStateToProps() {
|
||||
}
|
||||
|
||||
const mapDispatchToProps = {
|
||||
dispatchReprocessInteractiveImportItems: reprocessInteractiveImportItems,
|
||||
dispatchUpdateInteractiveImportItem: updateInteractiveImportItem
|
||||
};
|
||||
|
||||
@@ -72,6 +73,7 @@ class SelectMovieModalContentConnector extends Component {
|
||||
ids,
|
||||
items,
|
||||
dispatchUpdateInteractiveImportItem,
|
||||
dispatchReprocessInteractiveImportItems,
|
||||
onModalClose
|
||||
} = this.props;
|
||||
|
||||
@@ -84,6 +86,8 @@ class SelectMovieModalContentConnector extends Component {
|
||||
});
|
||||
});
|
||||
|
||||
dispatchReprocessInteractiveImportItems({ ids });
|
||||
|
||||
onModalClose(true);
|
||||
}
|
||||
|
||||
@@ -103,6 +107,7 @@ class SelectMovieModalContentConnector extends Component {
|
||||
SelectMovieModalContentConnector.propTypes = {
|
||||
ids: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
dispatchReprocessInteractiveImportItems: PropTypes.func.isRequired,
|
||||
dispatchUpdateInteractiveImportItem: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user