mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
New: Queued Task/Command List View
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import _ from 'lodash';
|
||||
import { createSelector } from 'reselect';
|
||||
import { findCommand, isCommandExecuting } from 'Utilities/Command';
|
||||
import createCommandsSelector from './createCommandsSelector';
|
||||
|
||||
function createCommandExecutingSelector(name) {
|
||||
function createCommandExecutingSelector(name, contraints = {}) {
|
||||
return createSelector(
|
||||
createCommandsSelector(),
|
||||
(commands) => {
|
||||
return _.some(commands, { name });
|
||||
return isCommandExecuting(findCommand(commands, { name, ...contraints }));
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user