Commit Graph

153 Commits

Author SHA1 Message Date
nzoba 3d4e56948d Save read duration to backup (#7672)
* Save read duration to backup

* Add default value

Co-authored-by: Andreas <andreas.everos@gmail.com>

Co-authored-by: Andreas <andreas.everos@gmail.com>
2022-08-03 17:40:13 -04:00
Andreas 069bd90c0f Cleanup data layer (#7450) 2022-07-03 15:48:13 -04:00
arkon 68697e59d7 More domain model usage 2022-07-03 13:46:09 -04:00
arkon 21771e62aa More SQLDelight migrations 2022-07-02 15:19:52 -04:00
arkon 7e4c45858f Bump dependencies 2022-06-29 22:45:22 -04:00
arkon 65264e3ef5 Migrate more track DB calls to SQLDelight 2022-06-26 19:46:41 -04:00
Taco c2520bff12 Utilize more KTX extensions (#7348) 2022-06-20 22:54:42 -04:00
arkon 254f021903 Minor cleanup 2022-06-20 22:51:04 -04:00
Andreas c5d84b4f24 Fix History not being added when restoring backup (#7324) 2022-06-17 17:29:07 -04:00
AntsyLich 9d5b7de1d8 Maintain source info in the database. (#6389)
* Maintain Source Info in database

* Review changes and cleanups

* Review changes 2

* Review Changes 3
2022-06-14 09:10:40 -04:00
Andreas fd5da2de3a Use SQLDelight in Backup/Restore (#7295)
* Use SQLDelight in Backup/Restore

* Use CoroutineWorker
2022-06-12 14:33:48 -04:00
AntsyLich 120943a8b3 Make syncChaptersWithSource use sqldelight (#7263)
* Make `syncChaptersWithSource` use sqldelight

Will break chapter list live update on current ui

Co-Authored-By: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>

* Review Changes

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
2022-06-11 11:38:39 -04:00
arkon 7fdbf40cd2 Minor cleanups
Pulling out some of the smaller changes that aren't related to the manga controller changes in #7244
2022-06-04 16:01:49 -04:00
arkon d1be221d7a Remove logic for restoring legacy JSON backups
- Protobuf backups have been around for 1.5 years now
- The ability to restore online-dependant data from JSON backups gets harder as time goes on and sources drift
- If users really need a way to restore them, they can use an older version of the app, or a separate tool for translating between the formats could be created
2022-05-29 12:24:39 -04:00
arkon 87661eb85a Minor cleanup 2022-05-24 18:16:07 -04:00
Andreas 0c631a4990 Add MangaUpdates as a tracker (#7170)
* Add MangaUpdates as a tracker

- jobobby04 co-authored for suggestion in BackupTracking.kt

Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>

* Changes from code review

Co-authored-by: arkon <arkon@users.noreply.github.com>

Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-05-24 18:00:33 -04:00
nicki 11c01235ac Don't save categories in backup if not selected (#7101)
Currently, manually created backups contain list of categories even if
Categories option is not selected during Backup Prompt. This leads to
empty categories being created when restoring such backup files

This commit adds a check before saving categories list info to the
backup file. The check is the same check which is used while backing up
category info of manga in library

Tested and worked successfully on app installed on Android 12
2022-05-09 11:03:40 -04:00
arkon dee7830793 Update navigation bar padding in Compose screens 2022-04-30 11:59:39 -04:00
arkon 2b79295240 Revert "Revert history Compose/SQLDelight changes"
This reverts commit 96c894ce5b.
2022-04-22 17:35:18 -04:00
arkon 96c894ce5b Revert history Compose/SQLDelight changes 2022-04-22 17:27:58 -04:00
arkon 189f92d7e8 Show better error message when empty backup creation is attempted (closes #6941) 2022-04-17 11:51:24 -04:00
Andreas c475acd1ea Migrate History screen to Compose (#6922)
* Migrate History screen to Compose

- Migrate screen
- Strip logic from presenter into use cases and repository
- Setup for other screen being able to migrate to Compose with Theme

* Changes from review comments
2022-04-17 10:36:22 -04:00
arkon 5afff31f72 Formatting 2022-04-08 16:44:23 -04:00
arkon f0eb42e72d Update linter 2022-04-08 15:30:39 -04:00
arkon 45da036789 Avoid potentially deleting the entire backups folder 2022-03-09 18:04:52 -05:00
Andreas 86016de6cb Recreate Backup worker with IS_AUTO_BACKUP_KEY flag (#6742)
* Recreate Backup worker with IS_AUTO_BACKUP_KEY flag

* Extra safety net to not delete backup folder
2022-03-06 08:36:47 -05:00
arkon d06984e3a3 Use same name for manual backup job tag and work name 2022-03-05 09:49:21 -05:00
Ivan Iskandar d53bb4c337 Use existing worker for manual backup creation (#6718)
* Use existing worker for manual backup creation

This will show the "creating backup" notification when auto backup is
running. Complete or error notification will continue to be shown only on
manual job.

* Make sure disabling auto backup don't cancel running manual backup job
2022-03-03 22:15:49 -05:00
啊o额iu鱼 6f5328f663 Fix corrupted backup file, fix #6424 (#6691)
Reappear stably on the api30 Android Studio Emulator,
first save a large backup file,
then save a small backup file, overwriting the previous larger backup file,
so you get a backup file with a larger size but only the first part is meaningful,
2022-02-23 09:12:24 -05:00
arkon b459234ddc Try to show more relevant exception messages when failing to restore a backup 2022-01-26 22:43:27 -05:00
arkon 76d2c676fd Discard backup file if it fails to be created properly (e.g. fails validation) 2022-01-26 22:32:06 -05:00
arkon d5015d37e1 Show error toast if empty URI is passed when trying to create/restore a backup 2022-01-26 22:31:28 -05:00
arkon 1b71e4cee7 Write job failure exceptions to error log 2022-01-26 22:21:01 -05:00
arkon 4f56071786 Validate backup during creation 2021-10-28 22:40:53 -04:00
arkon 9352e249ee Make tapping library update and backup restore error notifications open log 2021-10-18 09:58:35 -04:00
Ivan Iskandar 2e127dff1f Replace Timber with Square Logcat and make logging configurable (#6062)
* Replace Timber with Square Logcat

* Configurable logger
2021-10-07 22:12:55 -04:00
Jace 9a7a03e327 Change ProtoNumber of Backup Models for History and Source to a non-zero digit (#5849)
* Change ProtoNumber of Backup Models for History and Source to non-zero

Changed BackupHistory url and BackupSource name properties

* Provide backwards compatibility to current proto backups

- Added data class for zero-based protoNumber
- Restore both 'new' proto and old ones by mapping old to 'new' proto format
- Thanks to @jobobby04  for providing the initial solution.

* Fix on createBackup missing parameter for brokenSource

* Fix issues on build

* Fix missing import on FullBackupRestore
2021-09-11 18:10:10 -04:00
arkon e942b8a402 Read from streams for local source manga details and legacy backups 2021-09-06 11:54:00 -04:00
Gauthier 2cd8733212 change Track.last_chapter_read to Float (#5802)
each TrackService can convert it to Int if decimal chapters are not supported
2021-08-28 10:37:45 -04:00
arkon 07de367476 Revert "Set background job expedited policies"
This reverts commit c69420373a.

Caused crashes in TachiyomiSY for some reason. Will have to redo this once we target Android 12.
2021-06-09 17:11:23 -04:00
arkon 71d225c562 Address some build warnings 2021-06-05 17:49:20 -04:00
jobobby04 597cec3064 Legacy backup conversion to Kotlin Serialization (#5282)
* Legacy backup conversion to Kotlin Serialization

* Fix BackupTest compiling
2021-06-04 18:50:22 -04:00
arkon c69420373a Set background job expedited policies 2021-06-02 22:58:03 -04:00
Ivan Iskandar ef8a87a30f Bump compileSdk to 30 (#5140) 2021-05-22 14:48:27 -04:00
arkon 5e37f72d74 Remove legacy backup creation 2021-05-17 11:41:12 -04:00
Andreas 0fef546a0d Add manga-wised rotation mode settings (#4841)
* Add manga-wised rotation mode settings

Based on #3522

Co-authored-by: bboyz269 <4453811+bboyz269@users.noreply.github.com>

* Fix small mistakes

* Complete TODOs

* Rename functions

rotation -> orientation

* Fix orientation icon not changing

Bug from video

* Fix bug with force portrait not being force if a default value

Bug from video

* Backup viewer_flag as a seperate field in so legacy/forks doesn't crash

* Make viewer_flags nullable so old backups viewer gets restored

* Add migration for old rotation and viewer to new defaults ones

* Rename variable in enums

* Fix migration after OrientationType was changed

* Remove untrue comment

Co-authored-by: bboyz269 <4453811+bboyz269@users.noreply.github.com>
2021-04-28 08:32:47 -04:00
arkon a82e5f5452 Make library update/backup error log action clearer for non-technical users 2021-04-11 16:19:56 -04:00
arkon ff36901007 Don't repeatedly vibrate/make sounds on download progress 2021-04-01 12:18:54 -04:00
arkon 4a5bceb4e4 Fix offline restore ignoring manga from not installed sources (fixes #4679) 2021-03-20 10:03:13 -04:00
arkon 94f5117941 Remove online protobuf backup restore option 2021-03-13 18:45:22 -05:00