mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
Fixed: Queue Selector Looking for Episodes not Movies
This commit is contained in:
parent
9ae411802d
commit
24fa77e7b2
@ -2,19 +2,15 @@ import { createSelector } from 'reselect';
|
|||||||
|
|
||||||
function createQueueItemSelector() {
|
function createQueueItemSelector() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state, { episodeId }) => episodeId,
|
(state, { movieId }) => movieId,
|
||||||
(state) => state.queue.details.items,
|
(state) => state.queue.details.items,
|
||||||
(episodeId, details) => {
|
(movieId, details) => {
|
||||||
if (!episodeId) {
|
if (!movieId) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return details.find((item) => {
|
return details.find((item) => {
|
||||||
if (item.episode) {
|
return item.movieId === movieId;
|
||||||
return item.episode.id === episodeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user