jobobby04 / TachiyomiSY

Free and open source manga reader for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sync feature make the category unable to delete

Cologler opened this issue · comments

Steps to reproduce

  • Enable the sync feature and sync
  • Delete some categories
  • Sync

Expected behavior

Deleted categories do not come back

Actual behavior

Deleted categories come back

Crash logs

No response

TachiyomiSY version

latest preview

Android version

14

Device

phone

Other details

The code shows it always adds the non-existent categories:

// Add any categories from the remote list that are not in the local list
remoteCategoriesMap.forEach { (name, remoteCategory) ->
if (!mergedCategoriesMap.containsKey(name)) {
mergedCategoriesMap[name] = remoteCategory
}
}

I suggest caching the content (or hash) of the previously synced data and comparing it with the current sync, if the two are equal, overwrite remote data with local data instead of doing the merging operation.

@kaiserbh

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have gone through the FAQ and troubleshooting guide.
  • I have updated the app to version 1.10.5.
  • I have updated all installed extensions.
  • I will fill out all of the requested information in this form.

Or include a device ID in the synced data. If the latest synced device is the current device, overwrite remote data.

That could work but you will still need to delete the category manually in your other devices, as far as I know I don't think the backup restore process account for the deleted category.

Another benefit is that this approach can bypass some of the restore processes, improving synchronization speed and reducing synchronization conflicts. To give an example, when synchronizing while reading, sometimes already-read chapters may become unread after restoration.

Opened #1154 feel free to use that and test it, the latest master version or develop branch in syncyomi (https://github.com/SyncYomi/SyncYomi) have the feature but you will need to build it manually I haven't pushed the release yet. Also probably need to delete the current sync data or api key and generate a new one. @Cologler

This should be fixed with the latest changes right @Cologler ?

This should be fixed with the latest changes right @Cologler ?

The issue is still there.