@oxiaom/adoremix 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tts-deps.js +7 -1
package/package.json
CHANGED
package/src/tts-deps.js
CHANGED
|
@@ -84,13 +84,19 @@ function nodeModuleInstalled(workdir, modName) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
function getCredValue(cfg, dottedKey) {
|
|
87
|
+
// 直接读
|
|
87
88
|
const parts = dottedKey.split('.');
|
|
88
89
|
let cur = cfg;
|
|
89
90
|
for (const p of parts) {
|
|
90
91
|
if (cur == null || typeof cur !== 'object') return undefined;
|
|
91
92
|
cur = cur[p];
|
|
92
93
|
}
|
|
93
|
-
return cur;
|
|
94
|
+
if (cur) return cur;
|
|
95
|
+
// 兼容 Qt 已有字段:TTS.xf_appid → Settings.ttsxfAPPID
|
|
96
|
+
if (dottedKey === 'TTS.xf_appid' && cfg.Settings && cfg.Settings.ttsxfAPPID) return cfg.Settings.ttsxfAPPID;
|
|
97
|
+
if (dottedKey === 'TTS.xf_apiSecret' && cfg.Settings && cfg.Settings.ttsxfAPISecret) return cfg.Settings.ttsxfAPISecret;
|
|
98
|
+
if (dottedKey === 'TTS.xf_apiKey' && cfg.Settings && cfg.Settings.ttsxfAPIKey) return cfg.Settings.ttsxfAPIKey;
|
|
99
|
+
return undefined;
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
function detectAptLike() {
|