mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Only change remote setting if endpoint is configured
This commit is contained in:
@@ -149,10 +149,9 @@ class XTTSTtsProvider {
|
|||||||
$('#xtts_stream_chunk_size_output').text(this.settings.stream_chunk_size);
|
$('#xtts_stream_chunk_size_output').text(this.settings.stream_chunk_size);
|
||||||
|
|
||||||
saveTtsProviderSettings();
|
saveTtsProviderSettings();
|
||||||
this.changeTTSSetting();
|
this.changeTTSSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async loadSettings(settings) {
|
async loadSettings(settings) {
|
||||||
// Pupulate Provider UI given input settings
|
// Pupulate Provider UI given input settings
|
||||||
if (Object.keys(settings).length == 0) {
|
if (Object.keys(settings).length == 0) {
|
||||||
@@ -259,7 +258,11 @@ class XTTSTtsProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Each time a parameter is changed, we change the configuration
|
// Each time a parameter is changed, we change the configuration
|
||||||
async changeTTSSetting() {
|
async changeTTSSettings() {
|
||||||
|
if (!this.settings.provider_endpoint) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const response = await doExtrasFetch(
|
const response = await doExtrasFetch(
|
||||||
`${this.settings.provider_endpoint}/set_tts_settings`,
|
`${this.settings.provider_endpoint}/set_tts_settings`,
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user