diff options
Diffstat (limited to 'ext/js/data/options-util.js')
| -rw-r--r-- | ext/js/data/options-util.js | 11 | 
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index 89d50903..eb29dae4 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -826,16 +826,21 @@ class OptionsUtil {              sentenceParsing.terminationCharacterMode = sentenceParsing.enableTerminationCharacters ? 'custom' : 'newlines';              delete sentenceParsing.enableTerminationCharacters; -            const {sources, customSourceType} = audio; +            const {sources, customSourceUrl, customSourceType, textToSpeechVoice} = audio;              audio.sources = sources.map((type) => {                  switch (type) { +                    case 'text-to-speech': +                    case 'text-to-speech-reading': +                        return {type, url: '', voice: textToSpeechVoice};                      case 'custom': -                        return (customSourceType === 'json' ? 'custom-json' : 'custom'); +                        return {type: (customSourceType === 'json' ? 'custom-json' : 'custom'), url: customSourceUrl, voice: ''};                      default: -                        return type; +                        return {type, url: '', voice: ''};                  }              });              delete audio.customSourceType; +            delete audio.customSourceUrl; +            delete audio.textToSpeechVoice;          }          return options;      }  |