1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-25 22:37:27 -04:00

Add movie status to the main search page if the movie is already in the db (label on small screen otherwise progress bar under poster)

Fix issues with yellow/grey movie status color not showing up properly
Refactor the getMovieStatus to be more generic
This commit is contained in:
nitsua
2020-10-05 14:50:03 -04:00
committed by Qstick
parent e263d066da
commit 553b8b1945
12 changed files with 205 additions and 68 deletions
@@ -10,11 +10,17 @@ function createMapStateToProps() {
createExistingMovieSelector(),
createExclusionMovieSelector(),
createDimensionsSelector(),
(isExistingMovie, isExclusionMovie, dimensions) => {
(state) => state.queue.details.items,
(state) => state.tmdbId,
(isExistingMovie, isExclusionMovie, dimensions, queueItems, tmdbId) => {
const firstQueueItem = queueItems.find((q) => q.tmdbId === tmdbId);
return {
isExistingMovie,
isExclusionMovie,
isSmallScreen: dimensions.isSmallScreen
isSmallScreen: dimensions.isSmallScreen,
queueStatus: firstQueueItem ? firstQueueItem.status : null,
queueState: firstQueueItem ? firstQueueItem.trackedDownloadState : null
};
}
);