diff --git a/src/components/services/widget.jsx b/src/components/services/widget.jsx
index ca313588..61b31c0b 100644
--- a/src/components/services/widget.jsx
+++ b/src/components/services/widget.jsx
@@ -12,6 +12,7 @@ import Speedtest from "./widgets/service/speedtest";
import Traefik from "./widgets/service/traefik";
import Jellyseerr from "./widgets/service/jellyseerr";
import Npm from "./widgets/service/npm";
+import Tautulli from "./widgets/service/tautulli";
const widgetMappings = {
docker: Docker,
@@ -28,6 +29,7 @@ const widgetMappings = {
traefik: Traefik,
jellyseerr: Jellyseerr,
npm: Npm,
+ tautulli: Tautulli,
};
export default function Widget({ service }) {
diff --git a/src/components/services/widgets/service/tautulli.jsx b/src/components/services/widgets/service/tautulli.jsx
new file mode 100644
index 00000000..bed8afa2
--- /dev/null
+++ b/src/components/services/widgets/service/tautulli.jsx
@@ -0,0 +1,43 @@
+import useSWR from "swr";
+
+import Widget from "../widget";
+import Block from "../block";
+
+export default function Tautulli({ service }) {
+ const config = service.widget;
+
+ function buildApiUrl(endpoint) {
+ const { url, key } = config;
+ const fullUrl = `${url}/api/v2?apikey=${key}&cmd=${endpoint}`;
+ return "/api/proxy?url=" + encodeURIComponent(fullUrl);
+ }
+
+ const { data: statsData, error: statsError } = useSWR(buildApiUrl("get_activity"), {
+ refreshInterval: 1000,
+ });
+
+ if (statsError) {
+ return ;
+ }
+
+ if (!statsData) {
+ return (
+
+
+
+
+
+ );
+ }
+
+ const data = statsData.response.data;
+
+ return (
+
+
+
+ {/* We divide by 1000 here because thats how Tautulli reports it on its own dashboard */}
+
+
+ );
+}