aboutsummaryrefslogtreecommitdiff
path: root/ext/js/background/backend.js
diff options
context:
space:
mode:
authorStefanVukovic99 <stefanvukovic44@gmail.com>2024-06-27 18:08:42 +0200
committerGitHub <noreply@github.com>2024-06-27 16:08:42 +0000
commit603c2c7e1b50d8b06c06848c3e83d241da9437e6 (patch)
tree2e04bdb57475c630170315678d789751bfeb6444 /ext/js/background/backend.js
parent4e3f23e942252dacb31780de30f0233eccf1d9f8 (diff)
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>
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r--ext/js/background/backend.js7
1 files changed, 4 insertions, 3 deletions
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);