Skip to content

Usenet streaming with a WebDAV server and a SABnzbd-compatible API

C#

Update defaults for max-queue-connections and max-health-connections.

nzbdav-dev3b3ccc42c7ca
diff --git a/backend/Config/ConfigManager.cs b/backend/Config/ConfigManager.cs
index 8746f718..6474114e 100644
--- a/backend/Config/ConfigManager.cs
+++ b/backend/Config/ConfigManager.cs
@@ -167,7 +167,7 @@ public class ConfigManager
{
return int.Parse(
StringUtil.EmptyToNull(GetConfigValue("repair.connections"))
- ?? "0"
+ ?? GetMaxConnections().ToString()
);
}
@@ -177,7 +177,7 @@ public class ConfigManager
var configValue = StringUtil.EmptyToNull(GetConfigValue("repair.enable"));
var isRepairJobEnabled = (configValue != null ? bool.Parse(configValue) : defaultValue);
return isRepairJobEnabled
- && GetMaxConnections() > 0
+ && GetMaxRepairConnections() > 0
&& GetLibraryDir() != null
&& GetArrConfig().GetInstanceCount() > 0;
}
diff --git a/frontend/app/routes/settings/repairs/repairs.tsx b/frontend/app/routes/settings/repairs/repairs.tsx
index 4b0db6f5..c67d79b2 100644
--- a/frontend/app/routes/settings/repairs/repairs.tsx
+++ b/frontend/app/routes/settings/repairs/repairs.tsx
@@ -58,11 +58,11 @@ export function RepairsSettings({ config, setNewConfig }: RepairsSettingsProps)
type="text"
id="repairs-connections-input"
aria-describedby="repairs-connections-help"
- placeholder="0"
+ placeholder={"All"}
value={config["repair.connections"] || ""}
onChange={e => setNewConfig({ ...config, "repair.connections": e.target.value })} />
<Form.Text id="repairs-connections-help" muted>
- The background health-check job will not use any more than this number of connections.
+ The background health-check job will not use any more than this number of connections. Will default to your overall Max Connections if left empty.
</Form.Text>
</Form.Group>
</div>
@@ -86,4 +86,4 @@ function isValidRepairsConnections(repairsConnections: string): boolean {
function isNonNegativeInteger(value: string) {
const num = Number(value);
return Number.isInteger(num) && num >= 0 && value.trim() === num.toString();
-}
\ No newline at end of file
+}
diff --git a/frontend/app/routes/settings/sabnzbd/sabnzbd.tsx b/frontend/app/routes/settings/sabnzbd/sabnzbd.tsx
index 348815eb..4712ca05 100644
--- a/frontend/app/routes/settings/sabnzbd/sabnzbd.tsx
+++ b/frontend/app/routes/settings/sabnzbd/sabnzbd.tsx
@@ -72,11 +72,11 @@ export function SabnzbdSettings({ config, setNewConfig }: SabnzbdSettingsProps)
type="text"
id="max-queue-connections-input"
aria-describedby="max-queue-connections-help"
- placeholder="10"
+ placeholder="All"
value={config["api.max-queue-connections"]}
onChange={e => setNewConfig({ ...config, "api.max-queue-connections": e.target.value })} />
<Form.Text id="max-queue-connections-help" muted>
- Queue processing tasks will not use any more than this number of connections.
+ Queue processing tasks will not use any more than this number of connections. Will default to your overall Max Connections if left empty.
</Form.Text>
</Form.Group>
<hr />
@@ -158,4 +158,4 @@ function isAlphaNumericWithDashes(input: string): boolean {
function isValidQueueConnections(maxQueueConnections: string): boolean {
return maxQueueConnections === "" || isPositiveInteger(maxQueueConnections);
-}
\ No newline at end of file
+}