mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
New: Readarr 0.1
This commit is contained in:
+14
-2
@@ -15,8 +15,9 @@ const newRemotePathMapping = {
|
||||
|
||||
const selectDownloadClientHosts = createSelector(
|
||||
(state) => state.settings.downloadClients.items,
|
||||
(downloadClients) => {
|
||||
const hosts = downloadClients.reduce((acc, downloadClient) => {
|
||||
(state) => state.settings.rootFolders.items,
|
||||
(downloadClients, rootFolders) => {
|
||||
const dlhosts = downloadClients.reduce((acc, downloadClient) => {
|
||||
const name = downloadClient.name;
|
||||
const host = downloadClient.fields.find((field) => {
|
||||
return field.name === 'host';
|
||||
@@ -30,6 +31,17 @@ const selectDownloadClientHosts = createSelector(
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
const hosts = rootFolders.reduce((acc, folder) => {
|
||||
const name = folder.name;
|
||||
|
||||
if (folder.isCalibreLibrary) {
|
||||
const group = acc[folder.host] = acc[folder.host] || [];
|
||||
group.push(name);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, dlhosts);
|
||||
|
||||
return Object.keys(hosts).map((host) => {
|
||||
return {
|
||||
key: host,
|
||||
|
||||
Reference in New Issue
Block a user