Only change remote setting if endpoint is configured
This commit is contained in:
parent
7168dbe508
commit
dc8e742502
|
@ -149,10 +149,9 @@ class XTTSTtsProvider {
|
|||
$('#xtts_stream_chunk_size_output').text(this.settings.stream_chunk_size);
|
||||
|
||||
saveTtsProviderSettings();
|
||||
this.changeTTSSetting();
|
||||
this.changeTTSSettings();
|
||||
}
|
||||
|
||||
|
||||
async loadSettings(settings) {
|
||||
// Pupulate Provider UI given input settings
|
||||
if (Object.keys(settings).length == 0) {
|
||||
|
@ -259,7 +258,11 @@ class XTTSTtsProvider {
|
|||
}
|
||||
|
||||
// Each time a parameter is changed, we change the configuration
|
||||
async changeTTSSetting() {
|
||||
async changeTTSSettings() {
|
||||
if (!this.settings.provider_endpoint) {
|
||||
return;
|
||||
}
|
||||
|
||||
const response = await doExtrasFetch(
|
||||
`${this.settings.provider_endpoint}/set_tts_settings`,
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue