Only change remote setting if endpoint is configured

This commit is contained in:
Cohee 2024-01-03 21:19:46 +02:00
parent 7168dbe508
commit dc8e742502
1 changed files with 6 additions and 3 deletions

View File

@ -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`,
{