From 4da931269c1d67cf0daad619ad04c1c05c5fc7d2 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Tue, 27 May 2025 17:31:34 +0000 Subject: [PATCH] fix(plex): On Plex webhook routes filter plex sources to get webhook source only #291 --- src/backend/server/plexRoutes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/server/plexRoutes.ts b/src/backend/server/plexRoutes.ts index de398a79..196a6ee6 100644 --- a/src/backend/server/plexRoutes.ts +++ b/src/backend/server/plexRoutes.ts @@ -23,9 +23,9 @@ export const setupPlexRoutes = (app: ExpressWithAsync, logger: Logger, scrobbleS if (payload !== undefined) { const playObj = PlexSource.formatPlayObj(payload, {newFromSource: true}); - const pSources = scrobbleSources.getByType('plex') as PlexSource[]; + const pSources = scrobbleSources.getByType('plex').filter(x => x instanceof PlexSource) as PlexSource[]; if (pSources.length === 0) { - plexLog.warn('Received valid Plex webhook payload but no Plex sources are configured'); + plexLog.warn('Received valid Plex webhook payload but no Plex Webhook sources are configured'); } for (const source of pSources) { -- 2.51.2