diff options
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r-- | ext/bg/js/backend.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index 1fdc4c70..66378b0c 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -21,9 +21,8 @@ conditionsTestValue, profileConditionsDescriptor handlebarsRenderDynamic requestText, requestJson, optionsLoad dictConfigured, dictTermsSort, dictEnabledSet -audioGetUrl jpConvertReading, jpDistributeFuriganaInflected, jpKatakanaToHiragana -AnkiNoteBuilder, AudioSystem, Translator, AnkiConnect, AnkiNull, Mecab, BackendApiForwarder, JsonSchema, ClipboardMonitor*/ +AnkiNoteBuilder, AudioSystem, AudioUriBuilder, Translator, AnkiConnect, AnkiNull, Mecab, BackendApiForwarder, JsonSchema, ClipboardMonitor*/ class Backend { constructor() { @@ -36,6 +35,7 @@ class Backend { this.optionsSchema = null; this.defaultAnkiFieldTemplates = null; this.audioSystem = new AudioSystem({getAudioUri: this._getAudioUri.bind(this)}); + this.audioUriBuilder = new AudioUriBuilder(); this.optionsContext = { depth: 0, url: window.location.href @@ -515,7 +515,7 @@ class Backend { async _onApiAudioGetUrl({definition, source, optionsContext}) { const options = this.getOptions(optionsContext); - return await audioGetUrl(definition, source, options); + return await this.audioUriBuilder.getUri(source, definition, options); } _onApiScreenshotGet({options}, sender) { @@ -771,7 +771,7 @@ class Backend { } const options = this.getOptions(optionsContext); - return await audioGetUrl(definition, source, options); + return await this.audioUriBuilder.getUri(source, definition, options); } async _audioInject(definition, fields, sources, optionsContext) { |