diff --git a/apps/admin-ui/src/app/scripts/ViaplayPanel.tsx b/apps/admin-ui/src/app/scripts/ViaplayPanel.tsx index fca0fc2..8736897 100644 --- a/apps/admin-ui/src/app/scripts/ViaplayPanel.tsx +++ b/apps/admin-ui/src/app/scripts/ViaplayPanel.tsx @@ -210,15 +210,21 @@ export function ViaplayPanel({ onChanged }: { onChanged?: (o: ViaplayOverview) = method: "POST", credentials: "include", headers: { "Content-Type": "application/json" }, - body: accountId ? undefined : JSON.stringify({}), + body: JSON.stringify(accountId ? { accountId } : {}), }); - const d = await r.json(); - if (!r.ok) throw new Error(d.error?.message ?? "Statuscheck mislukt"); + const d = await r.json().catch(() => ({})); + if (!r.ok) { + throw new Error( + d?.error?.message || d?.message || `Statuscheck mislukt (${r.status})` + ); + } applySettings(d); const list: ViaplayAccount[] = d.accounts ?? []; const ok = list.filter((a) => a.healthStatus === "ok").length; const dead = list.filter((a) => a.healthStatus === "dead").length; - setMsg(`Accountstatus: ${ok} actief · ${dead} dood`); + const sample = list.find((a) => a.id === accountId) || list.find((a) => a.subscriptionSummary); + const sub = sample?.subscriptionSummary ? ` · ${sample.subscriptionSummary}` : ""; + setMsg(`Accountstatus: ${ok} actief · ${dead} probleem${sub}`); } catch (e) { setErr(String((e as Error).message ?? e)); } finally { @@ -290,10 +296,10 @@ export function ViaplayPanel({ onChanged }: { onChanged?: (o: ViaplayOverview) = return ( - dood + probleem ); } @@ -330,7 +336,8 @@ export function ViaplayPanel({ onChanged }: { onChanged?: (o: ViaplayOverview) =

Sportagenda en live streams voor gekoppelde Viaplay-accounts. Voeg een account toe met sessie-token, access token en optioneel profile-id (uit een ingelogde browsersessie). - Manifests en licenties worden cache-first opgehaald (±5 min vóór start, gestaggerd). + Agenda: max 3 dagen vooruit (vervangt Viaplay uit de externe events-feed). Manifests en + licenties cache-first (±5 min vóór start).

@@ -378,9 +385,24 @@ export function ViaplayPanel({ onChanged }: { onChanged?: (o: ViaplayOverview) = {a.email} {" · "} {a.hasSession && a.hasAccessToken ? "tokens ok" : "tokens missen"} - {a.subscriptionSummary ? ` · ${a.subscriptionSummary}` : ""} {a.eventCount ? ` · ${a.eventCount} events` : ""} + {(a.subscriptionSummary || a.partnerName || a.healthError) && ( +
+ {a.subscriptionSummary ? ( + + {a.subscriptionSummary} + + ) : a.partnerName ? ( + {a.partnerName} + ) : null} + {a.healthError ? ( + + {a.healthError} + + ) : null} +
+ )}