mirror of
https://github.com/Radarr/Radarr
synced 2025-02-23 14:51:17 +00:00
Simply queue item for movie details page
This commit is contained in:
parent
b2a52e52b6
commit
17b8605751
3 changed files with 6 additions and 9 deletions
|
@ -286,7 +286,7 @@ class MovieDetails extends Component {
|
|||
onMonitorTogglePress,
|
||||
onRefreshPress,
|
||||
onSearchPress,
|
||||
queueItems,
|
||||
queueItem,
|
||||
movieRuntimeFormat
|
||||
} = this.props;
|
||||
|
||||
|
@ -544,7 +544,7 @@ class MovieDetails extends Component {
|
|||
hasMovieFiles={hasMovieFiles}
|
||||
monitored={monitored}
|
||||
isAvailable={isAvailable}
|
||||
queueItem={(queueItems.length > 0) ? queueItems[0] : null}
|
||||
queueItem={queueItem}
|
||||
/>
|
||||
</span>
|
||||
</InfoLabel>
|
||||
|
@ -830,7 +830,7 @@ MovieDetails.propTypes = {
|
|||
onRefreshPress: PropTypes.func.isRequired,
|
||||
onSearchPress: PropTypes.func.isRequired,
|
||||
onGoToMovie: PropTypes.func.isRequired,
|
||||
queueItems: PropTypes.arrayOf(PropTypes.object),
|
||||
queueItem: PropTypes.object,
|
||||
movieRuntimeFormat: PropTypes.string.isRequired
|
||||
};
|
||||
|
||||
|
|
|
@ -145,6 +145,8 @@ function createMapStateToProps() {
|
|||
return acc;
|
||||
}, []);
|
||||
|
||||
const queueItem = queueItems.find((item) => item.movieId === movie.id);
|
||||
|
||||
return {
|
||||
...movie,
|
||||
alternateTitles,
|
||||
|
@ -165,7 +167,7 @@ function createMapStateToProps() {
|
|||
nextMovie,
|
||||
isSmallScreen: dimensions.isSmallScreen,
|
||||
isSidebarVisible,
|
||||
queueItems,
|
||||
queueItem,
|
||||
movieRuntimeFormat
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import translate from 'Utilities/String/translate';
|
|||
import styles from './MovieStatusLabel.css';
|
||||
|
||||
function getMovieStatus(hasFile, isMonitored, isAvailable, queueItem = false) {
|
||||
|
||||
if (queueItem) {
|
||||
const queueStatus = queueItem.status;
|
||||
const queueState = queueItem.trackedDownloadStatus;
|
||||
|
@ -116,8 +115,4 @@ MovieStatusLabel.propTypes = {
|
|||
colorImpairedMode: PropTypes.bool
|
||||
};
|
||||
|
||||
MovieStatusLabel.defaultProps = {
|
||||
title: ''
|
||||
};
|
||||
|
||||
export default MovieStatusLabel;
|
||||
|
|
Loading…
Reference in a new issue