Commit Graph

284 Commits

Author SHA1 Message Date
NarwhalHorns 49b2b346b6 Support for private tracking with AniList and Bangumi (#1736)
Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-02-25 11:01:13 +00:00
Cuong-Tran e1724d1aa0 Fix backup/restore of category related preferences (#1726)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-02-24 22:04:39 +00:00
Roshan Varughese de36357da8 Add option to backup non-library read entries (#1324)
Co-authored-by: jobobby04 <jobobby04@gmail.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-14 16:30:23 +00:00
AntsyLich 518abf032c Remove legacy broken source and history backup 2024-08-30 11:36:34 +06:00
AntsyLich d6252ab770 Address spotless lint errors (#1138)
* Add spotless (with ktlint)

* Run spotlessApply

* screaming case screaming case screaming case

* Update PagerViewerAdapter.kt

* Update ReaderTransitionView.kt
2024-08-19 18:11:39 +06:00
AntsyLich 777ae2461e Remove detekt (#1130)
Annoying. More annoying in this project.
2024-08-19 12:51:37 +06:00
Roshan Varughese 31263084ec Add Backup and Restore of Extension Repos (#1057)
* Backup/Restore Extension Repos

* Refactor

* Moving to Under App Settings

* Sort by URL, Check existing by SHA and Error Logging

Untested. Currently in a lecture and can't test if the changes really work.

* Changes to logic

* Don't ask me what's happening here

* Renaming Variables

* Fixing restoreAmount & changes to logic

Co-Authored-By: AntsyLich <59261191+AntsyLich@users.noreply.github.com>

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-08-07 13:49:17 +06:00
AntsyLich 2858ef835f Rename backup restore error log file 2024-08-07 12:02:49 +06:00
Vetle Ledaal de8ef6dad7 Improve error message if restoring from JSON file (#1056)
* Improve error message if restoring from JSON file

* Replace Exception with IOException

* Use more generic error message if protobuf fails

* fix lint
2024-07-31 20:39:41 +06:00
AntsyLich c201b341a7 Cleanup backup/restore related code 2024-07-30 04:59:16 +06:00
AntsyLich 56fb4f62a1 Fix library is backed up when disabled and make categories backup/restore independent 2024-07-30 04:47:57 +06:00
AntsyLich f696f209c6 Fix issue with creating and restoring backup
Fixes #881
2024-06-13 03:27:52 +06:00
AntsyLich 119bcbf8ed Check category order before restoring from backup
Closes #632

Co-authored-by: Cologler <10906962+Cologler@users.noreply.github.com>
2024-06-08 06:38:35 +06:00
KaiserBh 4ae9dbe524 feat: db changes to accommodate new cross device syncing logic. (#450)
* feat: db changes to accommodate new syncing logic.

Using timestamp to sync is a bit skewed due to system clock etc and therefore there was a lot of issues with it such as removing a manga that shouldn't have been removed. Marking chapters as unread even though it was marked as a read. Hopefully by using versioning system it should eliminate those issues.

* chore: add new line.

* chore: remove isSyncing from Chapter/Manga model.

* chore: remove isSyncing leftover.

* chore: remove isSyncing.

* refactor: remove isSync guard.

Just use it directly to 1 now since we don't have the isSyncing field in Manga or Chapter.

* Lint and stuff

* Add missing ,

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-03-10 01:45:41 +06:00
AntsyLich aa498360db Move :core to :core:common 2024-01-29 15:20:21 +06:00
jobobby04 e0deeb8008 Backup and Restore Excluded scanlators (#166)
* Backup and Restore Excluded scanlators

* Improve performance

* This looks better
2024-01-21 11:38:36 +06:00
AntsyLich 5067160132 Add a temporary icon 2024-01-16 01:17:18 +06:00
KaiserBh b1067b942e Use transaction on restore to go brr. (#10375)
refactor: use transaction to go brr.

This improve the restore speed on fresh db and non fresh db.

Signed-off-by: KaiserBh <kaiserbh@proton.me>
2024-01-11 18:22:46 -05:00
arkon 83130f9bf9 Try to show actual path in invalid location downloader notification
Instead of the class/hashCode, which doesn't mean much to a user.
2023-12-31 23:33:10 -05:00
arkon 6f34c5e894 Prevent creating backups with no valid options selected 2023-12-31 09:33:19 -05:00
arkon 6ab8e1e73d Don't use reflection for handling backup options as boolean array
Wasn't working correctly in release build, _probably_ because of R8 despite kotlin-reflect
shipping with Proguard rules and us already keeping all Tachiyomi classes.
2023-12-30 20:29:12 -05:00
arkon f0a0ecfd4a Allow creating backups without library entries
- In case you want a backup of just settings?
- Also disable backup options if dependent option is disabled (and fix being able to toggle disabled items)
- Also fix crash in RestoreBackupScreen due to attempt to parcelize Uri
- Make restore validation message a bit nicer
2023-12-30 16:02:36 -05:00
arkon 5bba7af24a Allow partial restores (library/settings)
Closes #3136
2023-12-30 12:09:55 -05:00
arkon 32c3269291 Filter out empty source preferences when creating backups 2023-12-30 10:38:32 -05:00
arkon a1e84911be Clean up create backup UI 2023-12-30 10:36:30 -05:00
arkon ccec5c3efe Add ability to create manual backups with private preferences too 2023-12-28 17:38:37 -05:00
arkon 8735836498 Refactor backup option flags to normal data class of booleans 2023-12-28 16:44:46 -05:00
arkon 8b65fd5751 Minor exception message cleanup 2023-12-28 16:33:54 -05:00
arkon 4b208fc7ce Move backup models back to main app module
I didn't realize the package name change would break compatibility with forks
that still have the old package names...
2023-12-27 13:45:44 -05:00
arkon 950b4a6c90 Fix read duration statistic getting inflated when restoring history 2023-12-25 16:35:13 -05:00
arkon 2d7650537d Address some build warnings 2023-12-25 16:31:40 -05:00
arkon 6887d98f15 Minor tracking cleanups 2023-12-24 22:25:22 -05:00
arkon 5908bd1930 Move backup models to domain module 2023-12-24 18:01:58 -05:00
arkon 1a559124eb Split up BackupCreator into smaller classes 2023-12-24 16:56:16 -05:00
arkon 9f90ee358b Initial move of restore backup into a separate screen 2023-12-21 22:47:23 -05:00
arkon 83a67feb48 Foundations for partial restores
Related to #3136
2023-12-21 22:16:42 -05:00
arkon db3ddf07ee Set foreground service types for remaining jobs 2023-12-16 12:08:08 -05:00
arkon cd16522805 Split restoring logic into smaller classes 2023-12-16 11:43:18 -05:00
arkon 5fec881387 Clean up history restoring 2023-12-16 11:15:09 -05:00
arkon ad3d915fc5 Skip updating unchanged chapters and tracks when restoring backup 2023-12-15 23:11:14 -05:00
arkon 58daedc89e Clean up manga restoring logic
Some behavior changes:
- It prioritizes new entries, then anything more recently updated
- It copies the more recently updated entry's metadata (description, thumbnail, etc.)
2023-12-14 23:26:02 -05:00
arkon 0f9895eec8 Clean up category restoring logic 2023-12-11 22:48:42 -05:00
arkon 1ef01b53f2 Avoid starting restore job if already running
We already check in the settings screen where it's triggered, but who knows.
Also addressing some errors for method calls that require SDK 26+ (but don't
fail the build, somehow?).
2023-12-11 22:02:22 -05:00
arkon ab9a26f6bd Migrate to some newer date/time APIs 2023-12-08 23:11:53 -05:00
arkon 1f259f9298 Fix sharing saved pages from notification
Related to #8327
Deleting doesn't seem to do anything still, but at least doesn't throw an exception.

Also removed behavior of dismissing notification after sharing/deleting pages/backups
in case you want to do something again afterwards. Users can manually dismiss the
notification whenever they want.
2023-12-03 16:31:10 -05:00
arkon 6a48fed170 Remove storage permission check when manually creating backups
Co-authored-by: jmir1 <jmir1@users.noreply.github.com>
2023-12-03 14:25:09 -05:00
Ivan Iskandar 24e1b4034e Move workers to foreground service context a bit more safely (#10202)
The system will crash the app if the worker that calls setForeground() finished
before the service runner be able to call Service.startForeground(). This edge
case is not handled by WorkManager and there is no way to check if the required
calls are done.

So here we suspend the worker by an arbitrary duration assuming the transition
to foreground service is done by then.
2023-12-02 11:46:59 -05:00
arkon a74a689c90 Update UniFile
Which has more correct nullability for some methods and case insensitivity for listFiles where possible.
2023-11-27 22:21:40 -05:00
arkon 27c4db752c Actually use configured storage location for local source
Fixes #10178
2023-11-26 16:24:37 -05:00
arkon f365b53a0f Move automatic backups from /backup/automatic to /autobackup
Removes the need to try to create child folders, which simplifies things.
2023-11-26 16:04:25 -05:00