From f5696968e7d5ac14261e4e765e9db944c7f9b4fa Mon Sep 17 00:00:00 2001 From: fallenbagel <98979876+Fallenbagel@users.noreply.github.com> Date: Fri, 31 Jul 2026 07:03:28 +0800 Subject: [PATCH] fix: stop plex settings hanging when tautulli fails to load The loading guard required dataTautulli but only checked the Plex error, so a failed Tautulli request would leave the spinner up indefinitely in both setup and normal settings. Setup hides the Tautulli section entirely, so the request is skipped there rather than awaited. --- src/components/Settings/SettingsPlex.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/Settings/SettingsPlex.tsx b/src/components/Settings/SettingsPlex.tsx index 8d5eb8bb3..99911ee39 100644 --- a/src/components/Settings/SettingsPlex.tsx +++ b/src/components/Settings/SettingsPlex.tsx @@ -125,8 +125,13 @@ const SettingsPlex = ({ isSetupSettings }: SettingsPlexProps) => { error, mutate: revalidate, } = useSWR('/api/v1/settings/plex'); - const { data: dataTautulli, mutate: revalidateTautulli } = - useSWR('/api/v1/settings/tautulli'); + const { + data: dataTautulli, + error: errorTautulli, + mutate: revalidateTautulli, + } = useSWR( + isSetupSettings ? null : '/api/v1/settings/tautulli' + ); const { data: dataSync, mutate: revalidateSync } = useSWR( '/api/v1/settings/plex/sync', { @@ -334,7 +339,11 @@ const SettingsPlex = ({ isSetupSettings }: SettingsPlexProps) => { } }; - if ((!data || !dataTautulli) && !error) { + if ( + (!data || (!isSetupSettings && !dataTautulli)) && + !error && + !errorTautulli + ) { return ; } return (