Add Emby webhook integration and remove unused username field

Add Emby as a third media server integration alongside Plex and Jellyfin.
Emby webhooks use a similar payload format (JSON with nested Item object
and ProviderIds). Also removes the mediaServerUsername field from all
webhook connections since it was never used for authentication — the
token-in-URL is the sole auth mechanism. This simplifies the connection
UX to a single "Connect" button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 00:50:32 -05:00
co-authored by Claude Opus 4.6
parent 0409a65a56
commit bafa45ec79
11 changed files with 2292 additions and 178 deletions
+4
View File
@@ -6,6 +6,7 @@ import { webhookConnections } from "@/lib/db/schema";
import { createLogger } from "@/lib/logger";
import type { WebhookEvent } from "@/lib/services/webhooks";
import {
parseEmbyPayload,
parseJellyfinPayload,
parsePlexPayload,
processWebhook,
@@ -36,6 +37,9 @@ export async function POST(
if (connection.provider === "plex") {
const formData = await req.formData();
event = parsePlexPayload(formData);
} else if (connection.provider === "emby") {
const body = await req.json();
event = parseEmbyPayload(body);
} else {
const body = await req.json();
event = parseJellyfinPayload(body);