jobobby04 / TachiyomiSY

Free and open source manga reader for Android
Apache License 2.0
2.66k stars 144 forks source link

Sync feature make the category unable to delete #1149

Open Cologler opened 5 months ago

Cologler commented 5 months ago

Steps to reproduce

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:

https://github.com/jobobby04/TachiyomiSY/blob/fb1649125cd4fce6843ede61862de195b393f1d1/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/SyncService.kt#L294-L299

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

Cologler commented 5 months ago

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

kaiserbh commented 5 months ago

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.

Cologler commented 5 months ago

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.

kaiserbh commented 5 months ago

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

kaiserbh commented 5 months ago

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

Cologler commented 5 months ago

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

The issue is still there.

jacfalcon0 commented 1 month ago

I've still got it.