From 603c2c7e1b50d8b06c06848c3e83d241da9437e6 Mon Sep 17 00:00:00 2001 From: StefanVukovic99 Date: Thu, 27 Jun 2024 18:08:42 +0200 Subject: add lingua libre audio source (#1129) * add lingua libre audio source * mvp * run file requests in parallel * remove redundant language var * redundant api function --------- Co-authored-by: Cashew <52880648+cashewnuttynuts@users.noreply.github.com> --- ext/js/display/display-audio.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ext/js/display/display-audio.js') diff --git a/ext/js/display/display-audio.js b/ext/js/display/display-audio.js index c7e08ffe..0d1ca029 100644 --- a/ext/js/display/display-audio.js +++ b/ext/js/display/display-audio.js @@ -57,6 +57,7 @@ export class DisplayAudio { ['jpod101', 'JapanesePod101'], ['jpod101-alternate', 'JapanesePod101 (Alternate)'], ['jisho', 'Jisho.org'], + ['lingua-libre', 'Lingua Libre'], ['text-to-speech', 'Text-to-speech'], ['text-to-speech-reading', 'Text-to-speech (Kana reading)'], ['custom', 'Custom URL'], @@ -677,7 +678,8 @@ export class DisplayAudio { */ async _getTermAudioInfoList(source, term, reading) { const sourceData = this._getSourceData(source); - const infoList = await this._display.application.api.getTermAudioInfoList(sourceData, term, reading); + const languageSummary = this._display.getLanguageSummary(); + const infoList = await this._display.application.api.getTermAudioInfoList(sourceData, term, reading, languageSummary); return infoList.map((info) => ({info, audioPromise: null, audioResolved: false, audio: null})); } -- cgit v1.2.3