From 22238fe4f711267d001be95942b3151c536e0c18 Mon Sep 17 00:00:00 2001
From: TheCatLady <52870424+TheCatLady@users.noreply.github.com>
Date: Thu, 10 Jun 2021 00:50:34 -0400
Subject: [PATCH] fix(plex): disable library sync if Plex not configured, and
disable scan if no libraries (#1764)
---
src/components/Settings/SettingsPlex.tsx | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/components/Settings/SettingsPlex.tsx b/src/components/Settings/SettingsPlex.tsx
index 7578efba7..3d7a6fe55 100644
--- a/src/components/Settings/SettingsPlex.tsx
+++ b/src/components/Settings/SettingsPlex.tsx
@@ -94,11 +94,9 @@ const SettingsPlex: React.FC = ({ onComplete }) => {
const [isRefreshingPresets, setIsRefreshingPresets] = useState(false);
const [availableServers, setAvailableServers] =
useState(null);
- const {
- data: data,
- error: error,
- revalidate: revalidate,
- } = useSWR('/api/v1/settings/plex');
+ const { data, error, revalidate } = useSWR(
+ '/api/v1/settings/plex'
+ );
const { data: dataSync, revalidate: revalidateSync } = useSWR(
'/api/v1/settings/plex/sync',
{
@@ -540,7 +538,10 @@ const SettingsPlex: React.FC = ({ onComplete }) => {
-