diff --git a/ui/src/components/Settings/Overseerr/index.tsx b/ui/src/components/Settings/Overseerr/index.tsx index d977966f..39c3a273 100644 --- a/ui/src/components/Settings/Overseerr/index.tsx +++ b/ui/src/components/Settings/Overseerr/index.tsx @@ -79,7 +79,10 @@ const OverseerrSettings = () => { ? hostnameRef.current.value : hostnameRef.current.value.includes('https://') ? hostnameRef.current.value - : 'http://' + hostnameRef.current.value + : portRef.current.value == '443' + ? 'https://' + hostnameRef.current.value + : 'http://' + hostnameRef.current.value + const payload = { overseerr_url: addPortToUrl(hostnameVal, +portRef.current.value), overseerr_api_key: apiKeyRef.current.value, diff --git a/ui/src/components/Settings/Radarr/index.tsx b/ui/src/components/Settings/Radarr/index.tsx index 88fff991..42b18f0f 100644 --- a/ui/src/components/Settings/Radarr/index.tsx +++ b/ui/src/components/Settings/Radarr/index.tsx @@ -74,10 +74,12 @@ const RadarrSettings = () => { portRef.current?.value && apiKeyRef.current?.value ) { - const hostnameVal = hostnameRef.current.value.includes('http') + const hostnameVal = hostnameRef.current.value.includes('http://') ? hostnameRef.current.value - : hostnameRef.current.value.includes('https') + : hostnameRef.current.value.includes('https://') ? hostnameRef.current.value + : portRef.current.value == '443' ? + 'https://' + hostnameRef.current.value : 'http://' + hostnameRef.current.value let radarr_url = `${addPortToUrl(hostnameVal, +portRef.current.value)}` diff --git a/ui/src/components/Settings/Sonarr/index.tsx b/ui/src/components/Settings/Sonarr/index.tsx index 117d5f55..0e0c87b6 100644 --- a/ui/src/components/Settings/Sonarr/index.tsx +++ b/ui/src/components/Settings/Sonarr/index.tsx @@ -74,10 +74,12 @@ const SonarrSettings = () => { portRef.current?.value && apiKeyRef.current?.value ) { - const hostnameVal = hostnameRef.current.value.includes('http') + const hostnameVal = hostnameRef.current.value.includes('http://') ? hostnameRef.current.value - : hostnameRef.current.value.includes('https') + : hostnameRef.current.value.includes('https://') ? hostnameRef.current.value + : portRef.current.value == '443' + ? 'https://' + hostnameRef.current.value : 'http://' + hostnameRef.current.value let url = `${addPortToUrl(hostnameVal, +portRef.current.value)}`