From 9215bcf29fe54fade8b7700e7153a1ffefa69dd6 Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 24 Aug 2020 15:25:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E6=9C=97=E8=AF=BB=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E8=87=AA=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/storage/Backup.kt | 2 ++ app/src/main/java/io/legado/app/help/storage/Restore.kt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/app/src/main/java/io/legado/app/help/storage/Backup.kt b/app/src/main/java/io/legado/app/help/storage/Backup.kt index c431de070..bec27b53a 100644 --- a/app/src/main/java/io/legado/app/help/storage/Backup.kt +++ b/app/src/main/java/io/legado/app/help/storage/Backup.kt @@ -32,6 +32,7 @@ object Backup { "replaceRule.json", "txtTocRule.json", "readRecord.json", + "httpTTS.json", ReadBookConfig.readConfigFileName, "config.xml" ) @@ -59,6 +60,7 @@ object Backup { writeListToJson(App.db.replaceRuleDao().all, "replaceRule.json", backupPath) writeListToJson(App.db.txtTocRule().all, "txtTocRule.json", backupPath) writeListToJson(App.db.readRecordDao().all, "readRecord.json", backupPath) + writeListToJson(App.db.httpTTSDao().all, "httpTTS.json", backupPath) GSON.toJson(ReadBookConfig.configList)?.let { FileUtils.createFileIfNotExist(backupPath + File.separator + ReadBookConfig.readConfigFileName) .writeText(it) diff --git a/app/src/main/java/io/legado/app/help/storage/Restore.kt b/app/src/main/java/io/legado/app/help/storage/Restore.kt index ca73c6df4..e8800f542 100644 --- a/app/src/main/java/io/legado/app/help/storage/Restore.kt +++ b/app/src/main/java/io/legado/app/help/storage/Restore.kt @@ -137,6 +137,9 @@ object Restore { fileToListT(path, "readRecord.json")?.let { App.db.readRecordDao().insert(*it.toTypedArray()) } + fileToListT(path, "httpTTS.json")?.let { + App.db.httpTTSDao().insert(*it.toTypedArray()) + } } }