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 (