diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index b8100935..67b7ddfb 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -80,6 +80,11 @@
"queued": "Queued",
"movies": "Movies"
},
+ "lidarr": {
+ "wanted": "Wanted",
+ "queued": "Queued",
+ "albums": "Albums"
+ },
"readarr": {
"wanted": "Wanted",
"queued": "Queued",
diff --git a/src/components/services/widget.jsx b/src/components/services/widget.jsx
index 0bb5c08d..cdc5c00c 100644
--- a/src/components/services/widget.jsx
+++ b/src/components/services/widget.jsx
@@ -2,6 +2,7 @@ import { useTranslation } from "react-i18next";
import Sonarr from "./widgets/service/sonarr";
import Radarr from "./widgets/service/radarr";
+import Lidarr from "./widgets/service/lidarr";
import Readarr from "./widgets/service/readarr";
import Ombi from "./widgets/service/ombi";
import Portainer from "./widgets/service/portainer";
@@ -28,6 +29,7 @@ const widgetMappings = {
docker: Docker,
sonarr: Sonarr,
radarr: Radarr,
+ lidarr: Lidarr,
readarr: Readarr,
ombi: Ombi,
portainer: Portainer,
diff --git a/src/components/services/widgets/service/lidarr.jsx b/src/components/services/widgets/service/lidarr.jsx
new file mode 100644
index 00000000..6c5d95d4
--- /dev/null
+++ b/src/components/services/widgets/service/lidarr.jsx
@@ -0,0 +1,41 @@
+import useSWR from "swr";
+import { useTranslation } from "react-i18next";
+
+import Widget from "../widget";
+import Block from "../block";
+
+import { formatApiUrl } from "utils/api-helpers";
+
+export default function Lidarr({ service }) {
+ const { t } = useTranslation();
+
+ const config = service.widget;
+
+ const { data: albumsData, error: albumsError } = useSWR(formatApiUrl(config, "album"));
+ const { data: wantedData, error: wantedError } = useSWR(formatApiUrl(config, "wanted/missing"));
+ const { data: queueData, error: queueError } = useSWR(formatApiUrl(config, "queue/status"));
+
+ if (albumsError || wantedError || queueError) {
+ return ;
+ }
+
+ if (!albumsData || !wantedData || !queueData) {
+ return (
+
+
+
+
+
+ );
+ }
+
+ const have = albumsData.filter((album) => album.statistics.trackFileCount > 0);
+
+ return (
+
+
+
+
+
+ );
+}
diff --git a/src/pages/api/services/proxy.js b/src/pages/api/services/proxy.js
index 9e3a57ff..c5b66fce 100644
--- a/src/pages/api/services/proxy.js
+++ b/src/pages/api/services/proxy.js
@@ -12,6 +12,7 @@ const serviceProxyHandlers = {
pihole: genericProxyHandler,
radarr: genericProxyHandler,
sonarr: genericProxyHandler,
+ lidarr: genericProxyHandler,
readarr: genericProxyHandler,
speedtest: genericProxyHandler,
tautulli: genericProxyHandler,
diff --git a/src/utils/api-helpers.js b/src/utils/api-helpers.js
index 2c1929df..2d1768f8 100644
--- a/src/utils/api-helpers.js
+++ b/src/utils/api-helpers.js
@@ -14,6 +14,7 @@ const formats = {
overseerr: `{url}/api/v1/{endpoint}`,
ombi: `{url}/api/v1/{endpoint}`,
npm: `{url}/api/{endpoint}`,
+ lidarr: `{url}/api/v1/{endpoint}?apikey={key}`,
readarr: `{url}/api/v1/{endpoint}?apikey={key}`,
sabnzbd: `{url}/api/?apikey={key}&output=json&mode={endpoint}`,
coinmarketcap: `https://pro-api.coinmarketcap.com/{endpoint}`,