mirror of
https://github.com/p-stream/p-stream.git
synced 2026-03-11 17:55:33 +00:00
Update src/stores/player/utils/captionstranslation.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
071bdeca0d
commit
bdf5cba98b
1 changed files with 2 additions and 2 deletions
|
|
@ -76,11 +76,11 @@ async function translateCaption(
|
|||
for (let i = 0; i < RETRY_COUNT; i += 1) {
|
||||
try {
|
||||
text = await translateText(
|
||||
caption.text.replace("\n", "<br>"),
|
||||
caption.text.replaceAll("\n", "<br>"),
|
||||
targetLang,
|
||||
);
|
||||
if (text) {
|
||||
text = text.replace("<br>", "\n");
|
||||
text = text.replaceAll("<br>", "\n");
|
||||
break;
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue