Compare commits

...

2 Commits

Author SHA1 Message Date
vorotamoroz
48e4d57278 bump 2024-09-08 17:58:10 +09:00
vorotamoroz
7eae25edd0 - Fixed:
- Case-insensitive file handling
    - Full-lower-case files are no longer created during database checking.
  - Bulk chunk transfer
    - The default value will automatically adjust to an acceptable size when using IBM Cloudant.
2024-09-08 17:55:04 +09:00
6 changed files with 30 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
{
"id": "obsidian-livesync",
"name": "Self-hosted LiveSync",
"version": "0.23.21",
"version": "0.23.22",
"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",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "obsidian-livesync",
"version": "0.23.21",
"version": "0.23.22",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "obsidian-livesync",
"version": "0.23.21",
"version": "0.23.22",
"license": "MIT",
"dependencies": {
"@aws-sdk/client-s3": "^3.645.0",

View File

@@ -1,6 +1,6 @@
{
"name": "obsidian-livesync",
"version": "0.23.21",
"version": "0.23.22",
"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",

Submodule src/lib updated: c9af24ecd6...633af447d2

View File

@@ -688,6 +688,17 @@ ___However, to enable either of these changes, both remote and local databases n
await this.performAppReload();
}
async migrateCheckBulkSize() {
if (this.settings.sendChunksBulk) {
if (this.settings.couchDB_URI != "" && isCloudantURI(this.settings.couchDB_URI)) {
if (this.settings.sendChunksBulkMaxSize > 1) {
Logger("Cloudant does not support bulk size more than 1MB, Automatically fixed", LOG_LEVEL_NOTICE);
this.settings.sendChunksBulkMaxSize = 1;
await this.saveSettings();
}
}
}
}
async migrationCheck() {
const old = this.settings.settingVersion;
const current = SETTING_VERSION_SUPPORT_CASE_INSENSITIVE;
@@ -2687,25 +2698,27 @@ Or if you are sure know what had been happened, we can unlock the database from
const file = storageFileNameMap[storageFileNameCI2CS[e]];
if (!this.isFileSizeExceeded(file.stat.size)) {
await this.updateIntoDB(file);
fireAndForget(() => this.checkAndApplySettingFromMarkdown(e, true));
const path = getPathFromTFile(file);
fireAndForget(() => this.checkAndApplySettingFromMarkdown(path, true));
} else {
Logger(`UPDATE DATABASE: ${e} has been skipped due to file size exceeding the limit`, logLevel);
}
}));
initProcess.push(runAll("UPDATE STORAGE", filesExistOnlyInDatabase, async (e) => {
const w = databaseFileNameMap[databaseFileNameCI2CS[e]];
const path = getPath(w) ?? e;
if (w && !(w.deleted || w._deleted)) {
if (!this.isFileSizeExceeded(w.size)) {
await this.pullFile(e, undefined, false, undefined, false);
await this.pullFile(path, undefined, false, undefined, false);
fireAndForget(() => this.checkAndApplySettingFromMarkdown(e, true));
Logger(`Check or pull from db:${e} OK`);
Logger(`Check or pull from db:${path} OK`);
} else {
Logger(`UPDATE STORAGE: ${e} has been skipped due to file size exceeding the limit`, logLevel);
Logger(`UPDATE STORAGE: ${path} has been skipped due to file size exceeding the limit`, logLevel);
}
} else if (w) {
Logger(`Deletion history skipped: ${e}`, LOG_LEVEL_VERBOSE);
Logger(`Deletion history skipped: ${path}`, LOG_LEVEL_VERBOSE);
} else {
Logger(`entry not found: ${e}`);
Logger(`entry not found: ${path}`);
}
}));

View File

@@ -18,6 +18,12 @@ I have a lot of respect for that plugin, even though it is sometimes treated as
Hooray for open source, and generous licences, and the sharing of knowledge by experts.
#### Version history
- 0.23.22:
- Fixed:
- Case-insensitive file handling
- Full-lower-case files are no longer created during database checking.
- Bulk chunk transfer
- The default value will automatically adjust to an acceptable size when using IBM Cloudant.
- 0.23.21:
- New Features:
- Case-insensitive file handling