1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-26 22:56:23 -04:00

Override release grab modal

New: Option to override release and grab
New: Option to select download client when multiple of the same type are configured

Closes #4526
Closes #4774
This commit is contained in:
Mark McDowall
2023-03-27 16:49:12 -07:00
parent defdc84b7e
commit 07f0fbf9a5
31 changed files with 1423 additions and 533 deletions
@@ -0,0 +1,21 @@
import { createSelector } from 'reselect';
import DownloadProtocol from 'DownloadClient/DownloadProtocol';
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
import sortByName from 'Utilities/Array/sortByName';
export default function createEnabledDownloadClientsSelector(
protocol: DownloadProtocol
) {
return createSelector(
createSortedSectionSelector('settings.downloadClients', sortByName),
(downloadClients) => {
const { isFetching, isPopulated, error, items } = downloadClients;
const clients = items.filter(
(item) => item.protocol === protocol && item.enable
);
return { isFetching, isPopulated, error, items: clients };
}
);
}