mirror of
https://github.com/p-stream/p-stream.git
synced 2026-04-21 00:22:37 +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
96b74aa169
commit
071bdeca0d
1 changed files with 5 additions and 5 deletions
|
|
@ -108,18 +108,18 @@ async function translateCaptions(
|
||||||
|
|
||||||
const successCount = results.filter((v) => v).length;
|
const successCount = results.filter((v) => v).length;
|
||||||
const failedCount = results.length - successCount;
|
const failedCount = results.length - successCount;
|
||||||
const successPercentange = (successCount / results.length) * 100;
|
const successPercentage = (successCount / results.length) * 100;
|
||||||
const failedPercentange = (failedCount / results.length) * 100;
|
const failedPercentage = (failedCount / results.length) * 100;
|
||||||
// console.log(
|
// console.log(
|
||||||
// "Done translating captions",
|
// "Done translating captions",
|
||||||
// results.length,
|
// results.length,
|
||||||
// successCount,
|
// successCount,
|
||||||
// failedCount,
|
// failedCount,
|
||||||
// successPercentange,
|
// successPercentage,
|
||||||
// failedPercentange,
|
// failedPercentage,
|
||||||
// );
|
// );
|
||||||
|
|
||||||
if (failedPercentange > successPercentange) {
|
if (failedPercentage > successPercentage) {
|
||||||
throw new Error("Success percentage is not acceptable");
|
throw new Error("Success percentage is not acceptable");
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue