aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/database.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/database.js')
-rw-r--r--ext/bg/js/database.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js
index 9e90e6de..fcf8ef3f 100644
--- a/ext/bg/js/database.js
+++ b/ext/bg/js/database.js
@@ -228,6 +228,21 @@ class Database {
}
}
+ async getTitlesWithSequences() {
+ if (!this.db) {
+ throw 'Database not initialized';
+ }
+
+ const titles = [];
+ await this.db.dictionaries.each(row => {
+ if (row.hasSequences) {
+ titles.push(row.title);
+ }
+ });
+
+ return titles;
+ }
+
async importDictionary(archive, callback) {
if (!this.db) {
throw 'Database not initialized';