Fixed: (UI) Progress bar status for searching existing movies

This commit is contained in:
Bogdan 2023-11-09 18:20:45 +02:00
parent 0f5fabdfcd
commit b2a52e52b6
2 changed files with 10 additions and 12 deletions

View File

@ -66,6 +66,7 @@ class AddNewMovieSearchResult extends Component {
ratings,
folder,
images,
existingMovieId,
isExistingMovie,
isExclusionMovie,
isSmallScreen,
@ -74,8 +75,7 @@ class AddNewMovieSearchResult extends Component {
monitored,
hasFile,
isAvailable,
queueStatus,
queueState,
movieFile,
runtime,
movieRuntimeFormat,
certification
@ -120,13 +120,13 @@ class AddNewMovieSearchResult extends Component {
{
isExistingMovie &&
<MovieIndexProgressBar
movieId={existingMovieId}
movieFile={movieFile}
monitored={monitored}
hasFile={hasFile}
status={status}
width={posterWidth}
detailedProgressBar={true}
queueStatus={queueStatus}
queueState={queueState}
isAvailable={isAvailable}
/>
}
@ -278,6 +278,7 @@ AddNewMovieSearchResult.propTypes = {
ratings: PropTypes.object.isRequired,
folder: PropTypes.string.isRequired,
images: PropTypes.arrayOf(PropTypes.object).isRequired,
existingMovieId: PropTypes.number,
isExistingMovie: PropTypes.bool.isRequired,
isExclusionMovie: PropTypes.bool.isRequired,
isSmallScreen: PropTypes.bool.isRequired,
@ -286,9 +287,8 @@ AddNewMovieSearchResult.propTypes = {
monitored: PropTypes.bool.isRequired,
hasFile: PropTypes.bool.isRequired,
isAvailable: PropTypes.bool.isRequired,
movieFile: PropTypes.object,
colorImpairedMode: PropTypes.bool,
queueStatus: PropTypes.string,
queueState: PropTypes.string,
runtime: PropTypes.number.isRequired,
movieRuntimeFormat: PropTypes.string.isRequired,
certification: PropTypes.string

View File

@ -10,17 +10,15 @@ function createMapStateToProps() {
createExistingMovieSelector(),
createExclusionMovieSelector(),
createDimensionsSelector(),
(state) => state.queue.details.items,
(state, { internalId }) => internalId,
(isExistingMovie, isExclusionMovie, dimensions, queueItems, internalId) => {
const firstQueueItem = queueItems.find((q) => q.movieId === internalId && internalId > 0);
(state) => state.settings.ui.item.movieRuntimeFormat,
(isExistingMovie, isExclusionMovie, dimensions, internalId, movieRuntimeFormat) => {
return {
existingMovieId: internalId,
isExistingMovie,
isExclusionMovie,
isSmallScreen: dimensions.isSmallScreen,
queueStatus: firstQueueItem ? firstQueueItem.status : null,
queueState: firstQueueItem ? firstQueueItem.trackedDownloadState : null
movieRuntimeFormat
};
}
);