Update src/stores/player/utils/captionstranslation.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
vlOd 2025-12-27 01:21:40 +02:00 committed by GitHub
parent 071bdeca0d
commit bdf5cba98b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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) {