Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync feature make the category unable to delete #1149

Open
6 tasks done
Cologler opened this issue Apr 4, 2024 · 7 comments
Open
6 tasks done

Sync feature make the category unable to delete #1149

Cologler opened this issue Apr 4, 2024 · 7 comments
Labels
Bug Something isn't working

Comments

@Cologler
Copy link

Cologler commented Apr 4, 2024

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.
@Cologler Cologler added the Bug Something isn't working label Apr 4, 2024
@Cologler
Copy link
Author

Cologler commented Apr 4, 2024

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

@kaiserbh
Copy link

kaiserbh commented Apr 4, 2024

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
Copy link
Author

Cologler commented Apr 5, 2024

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
Copy link

kaiserbh commented Apr 7, 2024

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
Copy link

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

@Cologler
Copy link
Author

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

The issue is still there.

@jacfalcon0
Copy link

I've still got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants