fix(tts): ask GPT-SoVITS again before refusing an import
The voices page keeps the node's status for a minute. On a fresh install the first status said the storage place (models/gpt_sovits) was missing, so "Import character" refused with "存放位置不能写入" until the cached answer expired, although the folder existed by then. Before refusing, the import asks for the status once more. (Anomalous_TTS now also creates the folder when it starts.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
888e7c8dc4
commit
e4d351a44e
@@ -72,12 +72,10 @@ export async function openTtsImport({ files = [], target = null, onDone } = {})
|
||||
await anomalousAlert(t('ttsSetupRemote'));
|
||||
return;
|
||||
}
|
||||
// New characters always go to the storage place (changed in GPT-SoVITS settings).
|
||||
// New characters go to the storage place. The status is kept a minute (a fresh install's folder may be there by now): ask again before refusing.
|
||||
if (!target && !status.libraries.find(lib => lib.storage)?.writable) status = await loadGptSovitsStatus({ force: true }).catch(() => status) || status;
|
||||
const home = status.libraries.find(lib => lib.storage);
|
||||
if (!target && !home?.writable) {
|
||||
await anomalousAlert(t('ttsImportNoLibrary', { path: status.storage }));
|
||||
return;
|
||||
}
|
||||
if (!target && !home?.writable) return anomalousAlert(t('ttsImportNoLibrary', { path: status.storage }));
|
||||
|
||||
activeScope?.dispose();
|
||||
const scope = createViewScope();
|
||||
|
||||
Reference in New Issue
Block a user