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() {
|
||||
return createSelector(
|
||||
(state, { episodeId }) => episodeId,
|
||||
(state, { movieId }) => movieId,
|
||||
(state) => state.queue.details.items,
|
||||
(episodeId, details) => {
|
||||
if (!episodeId) {
|
||||
(movieId, details) => {
|
||||
if (!movieId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return details.find((item) => {
|
||||
if (item.episode) {
|
||||
return item.episode.id === episodeId;
|
||||
}
|
||||
|
||||
return false;
|
||||
return item.movieId === movieId;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user