add external caption source badges

This commit is contained in:
Pas 2025-08-26 22:43:55 -06:00
parent dd7ee4b2f3
commit bcf9d294c4
2 changed files with 15 additions and 0 deletions

View file

@ -113,6 +113,20 @@ export function CaptionOption(props: {
{props.subtitleType.toUpperCase()}
</span>
)}
{props.subtitleSource && (
<span
className={classNames(
"ml-2 px-2 py-0.5 rounded text-white text-xs font-semibold overflow-hidden text-ellipsis whitespace-nowrap",
{
"bg-blue-500": props.subtitleSource === "wyzie",
"bg-orange-500": props.subtitleSource === "opensubs",
"bg-purple-500": props.subtitleSource === "febbox",
},
)}
>
{props.subtitleSource.toUpperCase()}
</span>
)}
{props.isHearingImpaired && (
<Icon icon={Icons.EAR} className="ml-2" />
)}

View file

@ -194,6 +194,7 @@ export async function scrapeOpenSubtitlesCaptions(
type: caption.SubFormat || "srt",
needsProxy: false,
opensubtitles: true,
source: "opensubs", // shortened becuase used on CaptionView for badge
});
}