mirror of
https://github.com/p-stream/p-stream.git
synced 2026-05-08 01:39:54 +00:00
add external caption source badges
This commit is contained in:
parent
dd7ee4b2f3
commit
bcf9d294c4
2 changed files with 15 additions and 0 deletions
|
|
@ -113,6 +113,20 @@ export function CaptionOption(props: {
|
||||||
{props.subtitleType.toUpperCase()}
|
{props.subtitleType.toUpperCase()}
|
||||||
</span>
|
</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 && (
|
{props.isHearingImpaired && (
|
||||||
<Icon icon={Icons.EAR} className="ml-2" />
|
<Icon icon={Icons.EAR} className="ml-2" />
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,7 @@ export async function scrapeOpenSubtitlesCaptions(
|
||||||
type: caption.SubFormat || "srt",
|
type: caption.SubFormat || "srt",
|
||||||
needsProxy: false,
|
needsProxy: false,
|
||||||
opensubtitles: true,
|
opensubtitles: true,
|
||||||
|
source: "opensubs", // shortened becuase used on CaptionView for badge
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue