mirror of
https://github.com/p-stream/p-stream.git
synced 2026-01-11 20:10:32 +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 failedCount = results.length - successCount;
|
||||
const successPercentange = (successCount / results.length) * 100;
|
||||
const failedPercentange = (failedCount / results.length) * 100;
|
||||
const successPercentage = (successCount / results.length) * 100;
|
||||
const failedPercentage = (failedCount / results.length) * 100;
|
||||
// console.log(
|
||||
// "Done translating captions",
|
||||
// results.length,
|
||||
// successCount,
|
||||
// failedCount,
|
||||
// successPercentange,
|
||||
// failedPercentange,
|
||||
// successPercentage,
|
||||
// failedPercentage,
|
||||
// );
|
||||
|
||||
if (failedPercentange > successPercentange) {
|
||||
if (failedPercentage > successPercentage) {
|
||||
throw new Error("Success percentage is not acceptable");
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue