File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,13 @@ 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+ } ,
113120 {
114121 key : "LogLevel" ,
115122 name : "[调试] 日志等级" ,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export default {
66 Languages : [ "AUTO" , "ZH" ] ,
77 AutoCC : true ,
88 ShowOnly : false ,
9+ Compatibility : true ,
910 } ,
1011 Configs : {
1112 Languages : {
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Console.info(`PATHs: ${PATHs}`);
1818// 解析格式
1919const FORMAT = ( $request . headers ?. [ "Content-Type" ] ?? $request . headers ?. [ "content-type" ] ) ?. split ( ";" ) ?. [ 0 ] ;
2020Console . info ( `FORMAT: ${ FORMAT } ` ) ;
21- ( async ( ) => {
21+ ! ( async ( ) => {
2222 /**
2323 * 设置
2424 * @type {{Settings: import('./types').Settings} }
@@ -226,6 +226,10 @@ Console.info(`FORMAT: ${FORMAT}`);
226226 break ;
227227 }
228228 }
229+ if ( Settings . Compatibility ) {
230+ url . hostname = "video.google.com" ;
231+ url . pathname = "/timedtext" ;
232+ }
229233 if ( url . searchParams . get ( "tlang" ) ) {
230234 Console . info ( "翻译语言:已指定" ) ;
231235 // 保存目标语言
You can’t perform that action at this time.
0 commit comments