mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01:00
Fixed: Queue Selector Looking for Episodes not Movies
This commit is contained in:
parent
9ae411802d
commit
24fa77e7b2
1 changed files with 4 additions and 8 deletions
|
|
@ -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 a new issue