Show plex connection error

This commit is contained in:
shamoon 2023-07-13 23:03:10 -07:00
parent aeac95db48
commit 7844991617
2 changed files with 5 additions and 4 deletions

View file

@ -129,7 +129,8 @@
"playing": "Playing", "playing": "Playing",
"transcoding": "Transcoding", "transcoding": "Transcoding",
"bitrate": "Bitrate", "bitrate": "Bitrate",
"no_active": "No Active Streams" "no_active": "No Active Streams",
"plex_connection_error": "Check Plex Connection"
}, },
"omada": { "omada": {
"connectedAp": "Connected APs", "connectedAp": "Connected APs",

View file

@ -122,11 +122,11 @@ export default function Component({ service }) {
refreshInterval: 5000, refreshInterval: 5000,
}); });
if (activityError) { if (activityError || (activityData && Object.keys(activityData.response.data).length === 0)) {
return <Container service={service} error={activityError} />; return <Container service={service} error={activityError ?? { message: t("tautulli.plex_connection_error") } } />;
} }
if (!activityData || Object.keys(activityData.response.data).length === 0) { if (!activityData) {
return ( return (
<div className="flex flex-col pb-1 mx-1"> <div className="flex flex-col pb-1 mx-1">
<div className="text-theme-700 dark:text-theme-200 text-xs relative h-5 w-full rounded-md bg-theme-200/50 dark:bg-theme-900/20 mt-1"> <div className="text-theme-700 dark:text-theme-200 text-xs relative h-5 w-full rounded-md bg-theme-200/50 dark:bg-theme-900/20 mt-1">