From aeac95db489cfedfba37d88b7e2f796774a397f0 Mon Sep 17 00:00:00 2001 From: jonathann92 <9582585+jonathann92@users.noreply.github.com> Date: Thu, 13 Jul 2023 22:08:00 -0700 Subject: [PATCH 1/2] early exit if tautulli's data is an empty object Fix for when tautulli cannot reach to plex --- src/widgets/tautulli/component.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/tautulli/component.jsx b/src/widgets/tautulli/component.jsx index a0328383a..0768ccaa9 100644 --- a/src/widgets/tautulli/component.jsx +++ b/src/widgets/tautulli/component.jsx @@ -126,7 +126,7 @@ export default function Component({ service }) { return ; } - if (!activityData) { + if (!activityData || Object.keys(activityData.response.data).length === 0) { return (
From 78449916170a7b1eb3cf9dd9da5d4e38fc7c494d Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 13 Jul 2023 23:03:10 -0700 Subject: [PATCH 2/2] Show plex connection error --- public/locales/en/common.json | 3 ++- src/widgets/tautulli/component.jsx | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index fc0108a1e..6f490c226 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -129,7 +129,8 @@ "playing": "Playing", "transcoding": "Transcoding", "bitrate": "Bitrate", - "no_active": "No Active Streams" + "no_active": "No Active Streams", + "plex_connection_error": "Check Plex Connection" }, "omada": { "connectedAp": "Connected APs", diff --git a/src/widgets/tautulli/component.jsx b/src/widgets/tautulli/component.jsx index 0768ccaa9..e52eeb5d3 100644 --- a/src/widgets/tautulli/component.jsx +++ b/src/widgets/tautulli/component.jsx @@ -122,11 +122,11 @@ export default function Component({ service }) { refreshInterval: 5000, }); - if (activityError) { - return ; + if (activityError || (activityData && Object.keys(activityData.response.data).length === 0)) { + return ; } - if (!activityData || Object.keys(activityData.response.data).length === 0) { + if (!activityData) { return (