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-anki.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'ext/js/display/display-anki.js') diff --git a/ext/js/display/display-anki.js b/ext/js/display/display-anki.js index fc242549..b3b05408 100644 --- a/ext/js/display/display-anki.js +++ b/ext/js/display/display-anki.js @@ -193,7 +193,11 @@ export class DisplayAnki { */ _onOptionsUpdated({options}) { const { - general: {resultOutputMode, glossaryLayoutMode, compactTags}, + general: { + resultOutputMode, + glossaryLayoutMode, + compactTags, + }, dictionaries, anki: { tags, @@ -883,7 +887,13 @@ export class DisplayAnki { _getAnkiNoteMediaAudioDetails(details) { if (details.type !== 'term') { return null; } const {sources, preferredAudioIndex} = this._displayAudio.getAnkiNoteMediaAudioDetails(details.term, details.reading); - return {sources, preferredAudioIndex, idleTimeout: this._audioDownloadIdleTimeout}; + const languageSummary = this._display.getLanguageSummary(); + return { + sources, + preferredAudioIndex, + idleTimeout: this._audioDownloadIdleTimeout, + languageSummary, + }; } // View note functions -- cgit v1.2.3