|
7 | 7 | // @name:ru [VOT] - Закадровый перевод видео |
8 | 8 | // @name:zh [VOT] - 画外音视频翻译 |
9 | 9 | // @namespace vot |
10 | | -// @version 1.11.3.1 |
| 10 | +// @version 1.11.3.2 |
11 | 11 | // @author Toil, SashaXser, MrSoczekXD, mynovelhost, sodapng |
12 | 12 | // @description A small extension that adds a Yandex Browser video translation to other browsers |
13 | 13 | // @description:de Eine kleine Erweiterung, die eine Voice-over-Übersetzung von Videos aus dem Yandex-Browser zu anderen Browsern hinzufügt |
@@ -9727,7 +9727,7 @@ get isSupportOnlyLS() { |
9727 | 9727 | return buildVersion || scriptVersion || "unknown"; |
9728 | 9728 | } |
9729 | 9729 | function getRuntimeLocaleVersion() { |
9730 | | - const buildVersion = String("1.11.3.1"); |
| 9730 | + const buildVersion = String("1.11.3.2"); |
9731 | 9731 | const scriptVersion = typeof GM_info !== "undefined" ? String(GM_info?.script?.version || "") : ""; |
9732 | 9732 | return resolveRuntimeLocaleVersion(buildVersion, scriptVersion); |
9733 | 9733 | } |
@@ -11339,6 +11339,8 @@ localizedMessage; |
11339 | 11339 | } |
11340 | 11340 | return error2; |
11341 | 11341 | } |
| 11342 | + const INITIAL_VIDEO_TRANSLATION_RETRY_DELAY_MS = 75e3; |
| 11343 | + const SUBSEQUENT_VIDEO_TRANSLATION_RETRY_DELAY_MS = 25e3; |
11342 | 11344 | class VOTTranslationHandler { |
11343 | 11345 | videoHandler; |
11344 | 11346 | audioDownloader; |
@@ -11484,7 +11486,10 @@ isLivelyVoiceUnavailableError(value) { |
11484 | 11486 | } |
11485 | 11487 | }); |
11486 | 11488 | } |
11487 | | - async translateVideoImpl(videoData, requestLang, responseLang, translationHelp = null, shouldSendFailedAudio = false, signal = NEVER_ABORTED_SIGNAL, disableLivelyVoice = false) { |
| 11489 | + getVideoTranslationRetryDelayMs(retryAttempt) { |
| 11490 | + return retryAttempt === 0 ? INITIAL_VIDEO_TRANSLATION_RETRY_DELAY_MS : SUBSEQUENT_VIDEO_TRANSLATION_RETRY_DELAY_MS; |
| 11491 | + } |
| 11492 | + async translateVideoImpl(videoData, requestLang, responseLang, translationHelp = null, shouldSendFailedAudio = false, signal = NEVER_ABORTED_SIGNAL, disableLivelyVoice = false, retryAttempt = 0) { |
11488 | 11493 | clearTimeout(this.videoHandler.autoRetry); |
11489 | 11494 | this.finishDownloadSuccess(); |
11490 | 11495 | const requestLangForApi = this.videoHandler.getRequestLangForTranslation( |
@@ -11545,7 +11550,8 @@ isLivelyVoiceUnavailableError(value) { |
11545 | 11550 | translationHelp, |
11546 | 11551 | true, |
11547 | 11552 | signal, |
11548 | | - livelyDisabled |
| 11553 | + livelyDisabled, |
| 11554 | + retryAttempt |
11549 | 11555 | ); |
11550 | 11556 | } |
11551 | 11557 | } catch (err) { |
@@ -11581,9 +11587,10 @@ isLivelyVoiceUnavailableError(value) { |
11581 | 11587 | translationHelp, |
11582 | 11588 | shouldSendFailedAudio, |
11583 | 11589 | signal, |
11584 | | - livelyDisabled |
| 11590 | + livelyDisabled, |
| 11591 | + retryAttempt + 1 |
11585 | 11592 | ), |
11586 | | - 2e4, |
| 11593 | + this.getVideoTranslationRetryDelayMs(retryAttempt), |
11587 | 11594 | signal |
11588 | 11595 | ); |
11589 | 11596 | } |
|
0 commit comments