mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Identify indexers that are already setup in add list
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
import _ from 'lodash';
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
function createExclusionMovieSelector() {
|
||||
return createSelector(
|
||||
(state, { tmdbId }) => tmdbId,
|
||||
(state) => state.settings.importExclusions,
|
||||
(tmdbId, importExclusions) => {
|
||||
return _.some(importExclusions.items, { tmdbId });
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export default createExclusionMovieSelector;
|
@@ -0,0 +1,15 @@
|
||||
import _ from 'lodash';
|
||||
import { createSelector } from 'reselect';
|
||||
import createAllIndexersSelector from './createAllIndexersSelector';
|
||||
|
||||
function createExistingIndexerSelector() {
|
||||
return createSelector(
|
||||
(state, { definitionName }) => definitionName,
|
||||
createAllIndexersSelector(),
|
||||
(definitionName, indexers) => {
|
||||
return _.some(indexers, { definitionName });
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export default createExistingIndexerSelector;
|
Reference in New Issue
Block a user