mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-18 21:41:17 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f96cc6b82 | ||
|
|
8c8f5d045f |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "obsidian-livesync",
|
"id": "obsidian-livesync",
|
||||||
"name": "Self-hosted LiveSync",
|
"name": "Self-hosted LiveSync",
|
||||||
"version": "0.15.6",
|
"version": "0.15.7",
|
||||||
"minAppVersion": "0.9.12",
|
"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.",
|
"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",
|
"author": "vorotamoroz",
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "obsidian-livesync",
|
"name": "obsidian-livesync",
|
||||||
"version": "0.15.6",
|
"version": "0.15.7",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "obsidian-livesync",
|
"name": "obsidian-livesync",
|
||||||
"version": "0.15.6",
|
"version": "0.15.7",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"diff-match-patch": "^1.0.5",
|
"diff-match-patch": "^1.0.5",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "obsidian-livesync",
|
"name": "obsidian-livesync",
|
||||||
"version": "0.15.6",
|
"version": "0.15.7",
|
||||||
"description": "Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
|
"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",
|
"main": "main.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
18
src/main.ts
18
src/main.ts
@@ -898,7 +898,7 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async applyBatchChange() {
|
async applyBatchChange() {
|
||||||
await this.procFileEvent(true);
|
return await this.procFileEvent(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetAllFilesRecursively(file: TAbstractFile): TFile[] {
|
GetAllFilesRecursively(file: TAbstractFile): TFile[] {
|
||||||
@@ -930,11 +930,6 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
|
|||||||
|
|
||||||
async watchVaultRenameAsync(file: TAbstractFile, oldFile: any, cache?: CacheData) {
|
async watchVaultRenameAsync(file: TAbstractFile, oldFile: any, cache?: CacheData) {
|
||||||
Logger(`${oldFile} renamed to ${file.path}`, LOG_LEVEL.VERBOSE);
|
Logger(`${oldFile} renamed to ${file.path}`, LOG_LEVEL.VERBOSE);
|
||||||
try {
|
|
||||||
await this.applyBatchChange();
|
|
||||||
} catch (ex) {
|
|
||||||
Logger(ex);
|
|
||||||
}
|
|
||||||
if (file instanceof TFolder) {
|
if (file instanceof TFolder) {
|
||||||
const newFiles = this.GetAllFilesRecursively(file);
|
const newFiles = this.GetAllFilesRecursively(file);
|
||||||
// for guard edge cases. this won't happen and each file's event will be raise.
|
// for guard edge cases. this won't happen and each file's event will be raise.
|
||||||
@@ -1717,9 +1712,14 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
|
|||||||
});
|
});
|
||||||
if (!initialScan) {
|
if (!initialScan) {
|
||||||
await runAll("UPDATE STORAGE", onlyInDatabase, async (e) => {
|
await runAll("UPDATE STORAGE", onlyInDatabase, async (e) => {
|
||||||
Logger(`Check or pull from db:${e}`);
|
const w = await this.localDatabase.getDBEntryMeta(e);
|
||||||
await this.pullFile(e, filesStorage, false, null, false);
|
if (w) {
|
||||||
Logger(`Check or pull from db:${e} OK`);
|
Logger(`Check or pull from db:${e}`);
|
||||||
|
await this.pullFile(e, filesStorage, false, null, false);
|
||||||
|
Logger(`Check or pull from db:${e} OK`);
|
||||||
|
} else {
|
||||||
|
Logger(`entry not found, maybe deleted:${e}`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!initialScan) {
|
if (!initialScan) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ I appreciate for reviewing and giving me advice @Pouhon158!
|
|||||||
- 0.15.4 Fixed issues about asynchronous processing (e.g., Conflict check or hidden file detection)
|
- 0.15.4 Fixed issues about asynchronous processing (e.g., Conflict check or hidden file detection)
|
||||||
- 0.15.5 Add new features for setting Self-hosted LiveSync up more easier.
|
- 0.15.5 Add new features for setting Self-hosted LiveSync up more easier.
|
||||||
- 0.15.6 File tracking logic has been refined.
|
- 0.15.6 File tracking logic has been refined.
|
||||||
|
- 0.15.7 Fixed bug about renaming file.
|
||||||
|
|
||||||
### 0.14.1
|
### 0.14.1
|
||||||
- The target selecting filter was implemented.
|
- The target selecting filter was implemented.
|
||||||
|
|||||||
Reference in New Issue
Block a user