mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 16:43:25 +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() {
|
||||
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 a new issue