From 062d8bfda6688cf0812c5edd9d3e03e7e69e2bab Mon Sep 17 00:00:00 2001 From: Pas <74743263+Pasithea0@users.noreply.github.com> Date: Tue, 15 Jul 2025 19:59:50 -0600 Subject: [PATCH] more wyzie caption information --- src/providers/captions.ts | 7 +++++++ src/utils/wyziesubs.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/providers/captions.ts b/src/providers/captions.ts index d64dcc2..26658c0 100644 --- a/src/providers/captions.ts +++ b/src/providers/captions.ts @@ -13,6 +13,13 @@ export type Caption = { url: string; hasCorsRestrictions: boolean; language: string; + // Optional fields provided by Wyzie + flagUrl?: string; + display?: string; + media?: string; + isHearingImpaired?: boolean; + source?: string; + encoding?: string; }; export function getCaptionTypeFromUrl(url: string): CaptionType | null { diff --git a/src/utils/wyziesubs.ts b/src/utils/wyziesubs.ts index 6b3d451..91e07c9 100644 --- a/src/utils/wyziesubs.ts +++ b/src/utils/wyziesubs.ts @@ -62,6 +62,13 @@ export async function addWyzieCaptions( type: subtitle.format === 'srt' || subtitle.format === 'vtt' ? subtitle.format : 'srt', hasCorsRestrictions: false, language: subtitle.language, + // Additional metadata from Wyzie + flagUrl: subtitle.flagUrl, + display: subtitle.display, + media: subtitle.media, + isHearingImpaired: subtitle.isHearingImpaired, + source: typeof subtitle.source === 'number' ? subtitle.source.toString() : subtitle.source, + encoding: subtitle.encoding, })); return [...captions, ...wyzieCaptions];