refactor: remove deprecated navidrome/audiobookshelf widgets

Consolidate into the unified Audio Stats widget which adapts its UI
based on the linked integration kind — Navidrome shows artists/albums/
songs/now-playing, Audiobookshelf shows libraries/audiobooks/podcasts/
listening-time/sessions.

Removes: widget definitions, components, API routers, and the
deprecatedWidgetKinds mechanism (no longer needed).
This commit is contained in:
Thomas Camlong committed 2026-06-09 20:58:54 +02:00
1 parent 9da8ea1dec
commit 69ed608241
13 files changed
+4 -220

No files matched your search

@@ -1,12 +0,0 @@
import { audiobookshelfRequestHandler } from "@homarr/request-handler/audiobookshelf";
import { createOneIntegrationMiddleware } from "../../middlewares/integration";
import { createTRPCRouter, publicProcedure } from "../../trpc";
export const audiobookshelfRouter = createTRPCRouter({
getStats: publicProcedure.concat(createOneIntegrationMiddleware("query", "audiobookshelf")).query(async ({ ctx }) => {
const innerHandler = audiobookshelfRequestHandler.handler(ctx.integration, {});
const data = await innerHandler.getCachedOrUpdatedDataAsync({ forceUpdate: false });
return data.data;
}),
});
-2
View File
@@ -33,8 +33,6 @@ export const widgetRouter = createTRPCRouter({
speedtestTracker: lazy(() => import("./speedtest-tracker").then((mod) => mod.speedtestTrackerRouter)),
uptimeKuma: lazy(() => import("./uptime-kuma").then((mod) => mod.uptimeKumaRouter)),
audioStats: lazy(() => import("./audio-stats").then((mod) => mod.audioStatsRouter)),
audiobookshelf: lazy(() => import("./audiobookshelf").then((mod) => mod.audiobookshelfRouter)),
navidrome: lazy(() => import("./navidrome").then((mod) => mod.navidromeRouter)),
umami: lazy(() => import("./umami").then((mod) => mod.umamiRouter)),
ups: lazy(() => import("./ups").then((mod) => mod.upsRouter)),
});
@@ -1,21 +0,0 @@
import { z } from "zod/v4";
import { navidromeRequestHandler } from "@homarr/request-handler/navidrome";
import { createOneIntegrationMiddleware } from "../../middlewares/integration";
import { createTRPCRouter, publicProcedure } from "../../trpc";
export const navidromeRouter = createTRPCRouter({
getStats: publicProcedure
.concat(createOneIntegrationMiddleware("query", "navidrome"))
.input(
z.object({
integrationId: z.string(),
}),
)
.query(async ({ ctx }) => {
const innerHandler = navidromeRequestHandler.handler(ctx.integration, {});
const data = await innerHandler.getCachedOrUpdatedDataAsync({ forceUpdate: false });
return data.data;
}),
});