New: Readarr 0.1

This commit is contained in:
ta264
2020-05-06 21:14:11 +01:00
parent 476f2d6047
commit 08496c82af
911 changed files with 14837 additions and 24442 deletions
@@ -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,