Add subtitle-only download for already-downloaded videos

- download_subs_only(): yt-dlp --skip-download to fetch just .vtt sidecar
- POST /by-yt/{ytId}/download-subs endpoint
- CC chip now visible on downloaded videos; clicking checks YouTube,
  shows lang picker with "Add subtitles" button separate from re-download

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 21:16:30 +02:00
parent 27f17c16ef
commit bbf8365c70
4 changed files with 76 additions and 17 deletions

View File

@@ -92,6 +92,7 @@ export const createDownload = (youtube_video_id, quality, subtitle_langs) =>
export const getDownloads = () => api.get("/downloads");
export const getAvailableSubs = (ytId) => api.get(`/videos/by-yt/${ytId}/subs`);
export const getSubtitleFiles = (ytId) => api.get(`/videos/by-yt/${ytId}/subtitle-files`);
export const downloadSubs = (ytId, subtitle_langs) => api.post(`/videos/by-yt/${ytId}/download-subs`, { subtitle_langs });
export const getDownload = (id) => api.get(`/downloads/${id}`);
export const deleteDownload = (id) => api.delete(`/downloads/${id}`);
export const deleteAllDownloads = () => api.delete("/downloads/all");