diff --git a/src/components/Settings/SettingsServices.tsx b/src/components/Settings/SettingsServices.tsx
index 07ccafd3a..5a3b1e8c5 100644
--- a/src/components/Settings/SettingsServices.tsx
+++ b/src/components/Settings/SettingsServices.tsx
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
-import { defineMessages, FormattedMessage } from 'react-intl';
+import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
import Badge from '../Common/Badge';
import Button from '../Common/Button';
import useSWR from 'swr';
@@ -31,8 +31,48 @@ const messages = defineMessages({
activeProfile: 'Active Profile',
addradarr: 'Add Radarr Server',
addsonarr: 'Add Sonarr Server',
+ nodefault: 'No default server selected!',
+ nodefaultdescription:
+ 'At least one server must be marked as default before any requests will make it to your services.',
+ no4kimplemented: '(Default 4K servers are not currently implemented)',
});
+const NoDefaultAlert: React.FC = () => {
+ const intl = useIntl();
+ return (
+
+
+
+
+
+ {intl.formatMessage(messages.nodefault)}
+
+
+
{intl.formatMessage(messages.nodefaultdescription)}
+
+ {intl.formatMessage(messages.no4kimplemented)}
+
+
+
+
+
+ );
+};
+
interface ServerInstanceProps {
name: string;
isDefault?: boolean;
@@ -249,51 +289,57 @@ const SettingsServices: React.FC = () => {
{!radarrData && !radarrError &&
}
{radarrData && !radarrError && (
-
- {radarrData.map((radarr) => (
- setEditRadarrModal({ open: true, radarr })}
- onDelete={() =>
- setDeleteServerModal({
- open: true,
- serverId: radarr.id,
- type: 'radarr',
- })
- }
- />
- ))}
-
-
-
- setEditRadarrModal({ open: true, radarr: null })
+ <>
+ {radarrData.length > 0 &&
+ !radarrData.some(
+ (radarr) => radarr.isDefault && !radarr.is4k
+ ) && }
+
+ {radarrData.map((radarr) => (
+ setEditRadarrModal({ open: true, radarr })}
+ onDelete={() =>
+ setDeleteServerModal({
+ open: true,
+ serverId: radarr.id,
+ type: 'radarr',
+ })
}
- >
-
+ ))}
+
+
+
+ setEditRadarrModal({ open: true, radarr: null })
+ }
>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ >
)}
@@ -307,52 +353,58 @@ const SettingsServices: React.FC = () => {
{!sonarrData && !sonarrError &&
}
{sonarrData && !sonarrError && (
-
- {sonarrData.map((sonarr) => (
- setEditSonarrModal({ open: true, sonarr })}
- onDelete={() =>
- setDeleteServerModal({
- open: true,
- serverId: sonarr.id,
- type: 'sonarr',
- })
- }
- />
- ))}
-
-
-
- setEditSonarrModal({ open: true, sonarr: null })
+ <>
+ {sonarrData.length > 0 &&
+ !sonarrData.some(
+ (sonarr) => sonarr.isDefault && !sonarr.is4k
+ ) && }
+
+ {sonarrData.map((sonarr) => (
+ setEditSonarrModal({ open: true, sonarr })}
+ onDelete={() =>
+ setDeleteServerModal({
+ open: true,
+ serverId: sonarr.id,
+ type: 'sonarr',
+ })
}
- >
-
+ ))}
+
+
+
+ setEditSonarrModal({ open: true, sonarr: null })
+ }
>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ >
)}
>
diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json
index b1d7b2bf0..8072e1464 100644
--- a/src/i18n/locale/en.json
+++ b/src/i18n/locale/en.json
@@ -207,6 +207,9 @@
"components.Settings.menuPlexSettings": "Plex",
"components.Settings.menuServices": "Services",
"components.Settings.nextexecution": "Next Execution",
+ "components.Settings.no4kimplemented": "(Default 4K servers are not currently implemented)",
+ "components.Settings.nodefault": "No default server selected!",
+ "components.Settings.nodefaultdescription": "At least one server must be marked as default before any requests will make it to your services.",
"components.Settings.notificationsettings": "Notification Settings",
"components.Settings.notificationsettingsDescription": "Here you can pick and choose what types of notifications to send and through what types of services.",
"components.Settings.notrunning": "Not Running",