kaiserbh / tachiyomi

Free and open source manga reader for Android.
https://tachiyomi.org/
Apache License 2.0
4 stars 3 forks source link

Should not use local categories order #8

Closed Cologler closed 7 months ago

Cologler commented 7 months ago

Steps to reproduce

-

Expected behavior

-

Actual behavior

Lost categories.

Crash logs

No response

Tachiyomi version

latest

Android version

12

Device

phone

Other details

Currently, merging backup data tries to use the lower order if two categories have the same name:

https://github.com/kaiserbh/tachiyomi/blob/fb1649125cd4fce6843ede61862de195b393f1d1/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/SyncService.kt#L278-L292

However, the backup restore uses the order as the key:

https://github.com/kaiserbh/tachiyomi/blob/fb1649125cd4fce6843ede61862de195b393f1d1/app/src/main/java/eu/kanade/tachiyomi/data/backup/restore/restorers/MangaRestorer.kt#L344-L350

Which causes manga to lose their categories.

Acknowledgements

Cologler commented 7 months ago

Maybe should update all mangas's categories.