Skip to content

Commit 039e4e4

Browse files
committed
Revert "feat: 添加兼容模式设置以解决 Google 风控导致无法加载字幕的问题"
This reverts commit 4574819.
1 parent 4574819 commit 039e4e4

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

arguments-builder.config.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ export default defineConfig({
110110
type: "boolean",
111111
description: "是否仅显示“自动翻译”字幕,不显示源语言字幕。",
112112
},
113-
{
114-
key: "Compatibility",
115-
name: "[字幕] 兼容模式",
116-
defaultValue: true,
117-
type: "boolean",
118-
description: "是否启用兼容模式以解决 Google 风控导致无法加载字幕的问题。",
119-
},
120113
{
121114
key: "LogLevel",
122115
name: "[调试] 日志等级",

src/function/database.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export default {
66
Languages: ["AUTO", "ZH"],
77
AutoCC: true,
88
ShowOnly: false,
9-
Compatibility: true,
109
},
1110
Configs: {
1211
Languages: {

src/request.dev.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Console.info(`FORMAT: ${FORMAT}`);
226226
break;
227227
}
228228
}
229-
if (url.searchParams.has("tlang")) {
229+
if (url.searchParams.get("tlang")) {
230230
Console.info("翻译语言:已指定");
231231
// 保存目标语言
232232
Caches.tlang = url.searchParams.get("tlang");
@@ -239,13 +239,11 @@ Console.info(`FORMAT: ${FORMAT}`);
239239
Console.info("官方字幕:合成器");
240240
if (lang?.split?.(/[-_]/)?.[0] === url.searchParams.get("tlang")?.split?.(/[-_]/)?.[0]) Settings.ShowOnly = true;
241241
if (!Settings.ShowOnly) url.searchParams.set("subtype", "Official"); // 官方字幕
242-
if (Settings.Compatibility) url.searchParams.delete("subtype"); // 兼容模式移除 subtype 参数
243242
break;
244243
case "Translate":
245244
Console.info("翻译字幕:翻译器");
246245
url.searchParams.delete("tlang");
247246
url.searchParams.set("subtype", "Translate"); // 翻译字幕
248-
if (Settings.Compatibility) url.searchParams.delete("subtype"); // 兼容模式移除 subtype 参数
249247
/*
250248
switch (URL.query?.kind) { // 类型判断
251249
case "asr":
@@ -265,7 +263,6 @@ Console.info(`FORMAT: ${FORMAT}`);
265263
Console.info("外部字幕:外部源");
266264
url.searchParams.delete("tlang");
267265
url.searchParams.set("subtype", "External"); // 外挂字幕
268-
if (Settings.Compatibility) url.searchParams.delete("subtype"); // 兼容模式移除 subtype 参数
269266
break;
270267
}
271268
}

0 commit comments

Comments
 (0)