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/background/backend.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ext/js/background') diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index a468a3f6..96e8206b 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -676,8 +676,8 @@ export class Backend { } /** @type {import('api').ApiHandler<'getTermAudioInfoList'>} */ - async _onApiGetTermAudioInfoList({source, term, reading}) { - return await this._audioDownloader.getTermAudioInfoList(source, term, reading); + async _onApiGetTermAudioInfoList({source, term, reading, languageSummary}) { + return await this._audioDownloader.getTermAudioInfoList(source, term, reading, languageSummary); } /** @type {import('api').ApiHandler<'sendMessageToFrame'>} */ @@ -2171,7 +2171,7 @@ export class Backend { const {term, reading} = definitionDetails; if (term.length === 0 && reading.length === 0) { return null; } - const {sources, preferredAudioIndex, idleTimeout} = details; + const {sources, preferredAudioIndex, idleTimeout, languageSummary} = details; let data; let contentType; try { @@ -2181,6 +2181,7 @@ export class Backend { term, reading, idleTimeout, + languageSummary, )); } catch (e) { const error = this._getAudioDownloadError(e); -- cgit v1.2.3