You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/frontend/src/Store/Selectors/createQueueItemSelector.js

21 lines
446 B

import _ from 'lodash';
import { createSelector } from 'reselect';
function createQueueItemSelector() {
return createSelector(
(state, { episodeId }) => episodeId,
(state) => state.queue.details,
(episodeId, details) => {
if (!episodeId) {
return null;
}
return _.find(details.items, (item) => {
return item.album.id === episodeId;
});
}
);
}
export default createQueueItemSelector;