diff --git a/manifest.json b/manifest.json index 515d5da..a8d56a5 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-livesync", "name": "Self-hosted LiveSync", - "version": "0.10.0", + "version": "0.10.1", "minAppVersion": "0.9.12", "description": "Community implementation of self-hosted livesync. Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.", "author": "vorotamoroz", diff --git a/package-lock.json b/package-lock.json index 44f7644..4f2ed0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "obsidian-livesync", - "version": "0.10.0", + "version": "0.10.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "obsidian-livesync", - "version": "0.10.0", + "version": "0.10.1", "license": "MIT", "dependencies": { "diff-match-patch": "^1.0.5", diff --git a/package.json b/package.json index 10ed347..d510374 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-livesync", - "version": "0.10.0", + "version": "0.10.1", "description": "Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.", "main": "main.js", "type": "module", diff --git a/src/LocalPouchDB.ts b/src/LocalPouchDB.ts index 604055f..5777a4b 100644 --- a/src/LocalPouchDB.ts +++ b/src/LocalPouchDB.ts @@ -158,7 +158,7 @@ export class LocalPouchDB { async isOldDatabaseExists() { const db = new PouchDB(this.dbname + "-livesync", { auto_compaction: this.settings.useHistory ? false : true, - revs_limit: 100, + revs_limit: 20, deterministic_revs: true, skip_setup: true, }); @@ -253,9 +253,9 @@ export class LocalPouchDB { Logger(newDbStatus); if (this.settings.encrypt) { - enableEncryption(old, this.settings.passphrase); + enableEncryption(old, this.settings.passphrase, true); } - const rep = old.replicate.to(this.localDatabase); + const rep = old.replicate.to(this.localDatabase, { batch_size: 25, batches_limit: 10 }); rep.on("change", (e) => { progress.setMessage(`Converting ${e.docs_written} docs...`); Logger(`Converting ${e.docs_written} docs...`, LOG_LEVEL.VERBOSE); diff --git a/src/lib b/src/lib index 92c1bbc..b031e4e 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit 92c1bbc45dc7961d3af65dd151a9b3d3b48b18ec +Subproject commit b031e4e69d61ccbb5dce4024907705d4251b3d0e diff --git a/src/main.ts b/src/main.ts index eb78517..1123491 100644 --- a/src/main.ts +++ b/src/main.ts @@ -607,9 +607,9 @@ export default class ObsidianLiveSyncPlugin extends Plugin { this.logMessage = [].concat(this.logMessage).concat([newmessage]).slice(-100); console.log(valutName + ":" + newmessage); this.setStatusBarText(null, messagecontent.substring(0, 30)); - if (message instanceof Error) { - console.trace(message); - } + // if (message instanceof Error) { + // console.trace(message); + // } if (level >= LOG_LEVEL.NOTICE) { if (messagecontent in this.notifies) {