From cca01e85a35576225661699a7be63550e9500642 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 30 May 2021 12:41:19 -0400 Subject: Improve multiple audio sources (#1718) * Add url/voice options to audio sources * Add help for TTS * Remove old settings * Update tests * Update use of audio source URL * Improve labels for sources with the same type --- ext/data/schemas/options-schema.json | 55 ++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 21 deletions(-) (limited to 'ext/data') diff --git a/ext/data/schemas/options-schema.json b/ext/data/schemas/options-schema.json index 9afad1e3..4b97342c 100644 --- a/ext/data/schemas/options-schema.json +++ b/ext/data/schemas/options-schema.json @@ -343,8 +343,6 @@ "enabled", "volume", "autoPlay", - "customSourceUrl", - "textToSpeechVoice", "sources" ], "properties": { @@ -362,31 +360,46 @@ "type": "boolean", "default": false }, - "customSourceUrl": { - "type": "string", - "default": "" - }, - "textToSpeechVoice": { - "type": "string", - "default": "" - }, "sources": { "type": "array", "items": { - "type": "string", - "enum": [ - "jpod101", - "jpod101-alternate", - "jisho", - "text-to-speech", - "text-to-speech-reading", - "custom", - "custom-json" + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "url", + "voice" ], - "default": "jpod101" + "properties": { + "type": { + "type": "string", + "enum": [ + "jpod101", + "jpod101-alternate", + "jisho", + "text-to-speech", + "text-to-speech-reading", + "custom", + "custom-json" + ], + "default": "jpod101" + }, + "url": { + "type": "string", + "default": "" + }, + "voice": { + "type": "string", + "default": "" + } + } }, "default": [ - "jpod101" + { + "type": "jpod101", + "url": "", + "voice": "" + } ] } } -- cgit v1.2.3