diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-06-25 15:36:28 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-06-25 15:36:28 -0700 |
commit | d3c342071f1397a59f94d89ca617e6294c50f861 (patch) | |
tree | 1a5b0f563e69f3c512741c40a8f09d97616f456f /ext/bg/js/database.js | |
parent | 98d22a92f33e50d6c75df08be70cf801610b4fb7 (diff) |
support importing from zip files
Diffstat (limited to 'ext/bg/js/database.js')
-rw-r--r-- | ext/bg/js/database.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js index 51f639d9..70aeb0d7 100644 --- a/ext/bg/js/database.js +++ b/ext/bg/js/database.js @@ -155,7 +155,7 @@ class Database { return this.db.dictionaries.toArray(); } - importDictionary(indexUrl, callback) { + importDictionary(archive, callback) { if (this.db === null) { return Promise.reject('database not initialized'); } @@ -204,7 +204,7 @@ class Database { return this.db.terms.bulkAdd(rows).then(() => { if (callback) { - callback(total, current, indexUrl); + callback(total, current); } }); }; @@ -224,11 +224,11 @@ class Database { return this.db.kanji.bulkAdd(rows).then(() => { if (callback) { - callback(total, current, indexUrl); + callback(total, current); } }); }; - return jsonLoadDb(indexUrl, indexLoaded, termsLoaded, kanjiLoaded).then(() => summary); + return zipLoadDb(archive, indexLoaded, termsLoaded, kanjiLoaded).then(() => summary); } } |