Commit 003d26b

benny-dou <60535774+benny-dou@users.noreply.github.com>
2025-05-13 03:25:35
fix(subtitle): fix typo
1 parent 16a5e16
Changed files (1)
src
preview
src/preview/ytdlp.py
@@ -258,7 +258,7 @@ async def preview_ytdlp(
         await save_messages(messages=sent_messages, key=url, metadata=metadata)
     if any(x in info["extractor"] for x in ["youtube", "bilibili"]) and append_transcription and (video_path.is_file() or audio_path.is_file()):
         res = await fetch_subtitle(url=url, provider="free")
-        subtitles = res.get("subtitle", "")
+        subtitles = res.get("subtitles", "")
         if not subtitles:
             ytdlp_transcription_engine = "gemini" if "youtube" in info["extractor"] else ytdlp_transcription_engine  # use gemini to bypass censorship
             res = await asr_file(audio_path, ytdlp_transcription_engine, duration, client=client, message=message, slient=True)