Skip to content

Commit 77ab637

Browse files
committed
fix: removed timeout for audio file
1 parent 410f891 commit 77ab637

File tree

4 files changed

+83
-58
lines changed

4 files changed

+83
-58
lines changed

changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
- Исправлено возникновение ошибок на YouTube в GreasyMonkey (#1055)
1414
- Исправлены слеты шрифта в меню на некоторых сайтах
1515
- Исправлено некорректное отображение заполнения слайдера после включения опции "Расширенное увеличение громкости видео"
16+
- Убран таймаут при загрузке аудио файла (#1074)
17+
- Увеличено значение для таймаута при загрузке аудио плеером (#1074)
1618
- ProtobufJS был заменен на `@bufbuild/protobuf`
1719

1820
# 1.8.5

dist/vot-min.user.js

+17-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vot.user.js

+57-39
Large diffs are not rendered by default.

src/index.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,9 @@ class VideoHandler {
373373
video: this.video,
374374
debug: DEBUG_MODE,
375375
fetchFn: GM_fetch,
376+
fetchOpts: {
377+
timeout: 0,
378+
},
376379
preferAudio,
377380
});
378381
return this;
@@ -1346,7 +1349,9 @@ class VideoHandler {
13461349
primaryColor,
13471350
);
13481351

1349-
const res = await GM_fetch(this.downloadTranslationUrl);
1352+
const res = await GM_fetch(this.downloadTranslationUrl, {
1353+
timeout: 0,
1354+
});
13501355
if (!res.ok) {
13511356
throw new Error(`HTTP ${res.status}`);
13521357
}
@@ -1375,7 +1380,7 @@ class VideoHandler {
13751380

13761381
downloadBlob(writer.getBlob(), `${filename}.mp3`);
13771382
} catch (err) {
1378-
console.error("Download failed:", err);
1383+
console.error("[VOT] Download failed:", err);
13791384
this.transformBtn(
13801385
"error",
13811386
localizationProvider.get("downloadFailed"),

0 commit comments

Comments
 (0)