1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-21 22:05:43 -04:00

Fixed: Address issues with the status being wrong color on the index and movie details (not tracking anything queued/downloading)

Fixed: Updated fetchQueueDetails() to not pass movie ids since the store doesn't use them anyways
New: Added text to index poster progress bar showing status

#4525
#4526
#4982
This commit is contained in:
Austin Best
2020-07-25 17:59:03 -04:00
committed by Qstick
parent a2e8d1d5d6
commit c51b08e26c
24 changed files with 249 additions and 83 deletions
@@ -3,6 +3,9 @@ import React from 'react';
import ProgressBar from 'Components/ProgressBar';
import { sizes } from 'Helpers/Props';
import getProgressBarKind from 'Utilities/Movie/getProgressBarKind';
import getQueueStatusText from 'Utilities/Movie/getQueueStatusText';
import titleCase from 'Utilities/String/titleCase';
import translate from 'Utilities/String/translate';
import styles from './MovieIndexProgressBar.css';
function MovieIndexProgressBar(props) {
@@ -11,20 +14,43 @@ function MovieIndexProgressBar(props) {
status,
hasFile,
posterWidth,
detailedProgressBar
detailedProgressBar,
queueStatus,
queueState
} = props;
const progress = 100;
const queueStatusText = getQueueStatusText(queueStatus, queueState);
let movieStatus = (status === 'released' && hasFile) ? 'downloaded' : status;
if (movieStatus === 'deleted') {
movieStatus = 'announced';
if (hasFile) {
movieStatus = 'downloaded';
} else {
movieStatus = 'released';
}
}
if (movieStatus === 'announced') {
movieStatus = translate('NotAvailable');
}
if (movieStatus === 'released') {
movieStatus = translate('Missing');
}
return (
<ProgressBar
className={styles.progressBar}
containerClassName={styles.progress}
progress={progress}
kind={getProgressBarKind(status, monitored, hasFile)}
kind={getProgressBarKind(status, monitored, hasFile, queueStatusText)}
size={detailedProgressBar ? sizes.MEDIUM : sizes.SMALL}
showText={false} // Hide until we have multi version support
showText={detailedProgressBar}
width={posterWidth}
text={(queueStatusText) ? queueStatusText.shortText : titleCase(movieStatus)}
/>
);
}
@@ -34,7 +60,9 @@ MovieIndexProgressBar.propTypes = {
hasFile: PropTypes.bool.isRequired,
status: PropTypes.string.isRequired,
posterWidth: PropTypes.number.isRequired,
detailedProgressBar: PropTypes.bool.isRequired
detailedProgressBar: PropTypes.bool.isRequired,
queueStatus: PropTypes.string,
queueState: PropTypes.string
};
export default MovieIndexProgressBar;