From 0331374241a55415cbae37d386f47da428ede3db Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 3 Sep 2021 22:33:58 -0400 Subject: Dictionary media import improvements (#1926) * Add base64ToArrayBuffer to StringUtil * Remove unnecessary media-util.js import * Run async requirements in serial rather than parallel * Update API.getMedia handler to convert ArrayBuffer content to base64 * Rename getImageResolution to getImageDetails * Change parameter order of getImageDetails * Pre-process and store media as an ArrayBuffer * Remove MediaUtil.createBlobFromBase64Content * Fix Anki media injection --- dev/database-vm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dev') diff --git a/dev/database-vm.js b/dev/database-vm.js index ebde5a2a..a7ad2508 100644 --- a/dev/database-vm.js +++ b/dev/database-vm.js @@ -69,9 +69,9 @@ class DatabaseVM extends VM { } class DatabaseVMDictionaryImporterMediaLoader { - async getImageResolution() { + async getImageDetails(content) { // Placeholder values - return {width: 100, height: 100}; + return {content, width: 100, height: 100}; } } -- cgit v1.2.3