Fix subtitle positioning and show existing langs without re-downloading
- Strip yt-dlp's align:start position:0% cue settings from VTT files after both video download and subtitle-only download so CSS ::cue centers them - CC chip now shows already-downloaded langs (e.g. 'CC: en') directly from disk with a '+' button to add more — no YouTube call needed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -995,15 +995,18 @@ export default function Watch() {
|
||||
)}
|
||||
|
||||
{(() => {
|
||||
// Subs already on disk → show indicator (player CC button handles the rest)
|
||||
// Subs already on disk → show langs + "+" to add more
|
||||
if (subtitleFiles.length > 0 && !subsRequested) return (
|
||||
<button
|
||||
onClick={() => setSubsRequested(true)}
|
||||
className="flex items-center gap-1 px-3 py-1.5 rounded-full bg-zinc-800 text-zinc-400 text-xs hover:bg-zinc-700 transition-colors"
|
||||
title="Subtitles loaded — click to add more languages"
|
||||
>
|
||||
CC ✓
|
||||
</button>
|
||||
<div className="flex items-center gap-1">
|
||||
<span className="px-3 py-1.5 rounded-full bg-zinc-800 text-zinc-400 text-xs font-mono">
|
||||
CC: {subtitleFiles.map(s => s.lang).join(", ")}
|
||||
</span>
|
||||
<button
|
||||
onClick={() => setSubsRequested(true)}
|
||||
className="px-2.5 py-1.5 rounded-full text-xs bg-zinc-800 text-zinc-500 hover:bg-zinc-700 transition-colors"
|
||||
title="Add subtitle language"
|
||||
>+</button>
|
||||
</div>
|
||||
);
|
||||
// Not yet asked → show CC chip
|
||||
if (!subsRequested) return (
|
||||
|
||||
Reference in New Issue
Block a user