Commit Graph

125 Commits

Author SHA1 Message Date
95b294ebd6 chore: merge upstream
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2024-01-07 10:04:34 +11:00
efb8d61e3e chore: ktlint.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2024-01-07 09:58:26 +11:00
eb5b1610d0 feat: Enhanced SyncYomi with Robust Locking Mechanism
- Introduced `LockFile` data class to manage sync status and ownership.
- Enumerated `SyncStatus` to clearly indicate the stage of synchronization: Pending, Syncing, or Success.
- Implemented a new `beforeSync` method utilizing `OkHttpClient` for secure HTTP calls to manage the lock file.
- Added JSON serialization for lock file management and status updates.
- Implemented exponential backoff strategy to handle concurrent sync attempts and reduce race conditions.
- Added comprehensive logging for debugging and monitoring sync processes.

This update enhances the reliability and concurrency handling of SyncYomi's synchronization process, ensuring users experience seamless and efficient data syncing in a self-hosted environment.

Signed-off-by: KaiserBh <kaiserbh@proton.me>
2024-01-07 09:50:30 +11:00
2e5686372a Merge branch 'master' into sync-part-final 2024-01-06 16:35:24 +11:00
32bed9b041 Change fetch interval action to show days until next expected update 2024-01-05 17:08:39 -05:00
227d723622 chore: merge upstream
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2024-01-04 04:34:20 +11:00
7bd9c2f7c0 Merge branch 'master' into sync-part-final 2024-01-03 00:45:44 +11:00
22589a9c30 Fix next expected update being weird number sometimes
Occurs if manga.lastUpdate has never been set yet.
2024-01-01 18:32:21 -05:00
37033cbfc3 chore: ktlint.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-12-29 01:59:14 +11:00
0d117b84c0 feat: Add trigger to sync before library update.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-12-29 01:56:05 +11:00
8ba133ae7b chore: fix conflict.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-12-29 01:12:23 +11:00
80570a823f chore: merge upstream changes.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-12-28 22:48:32 +11:00
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
6887d98f15 Minor tracking cleanups 2023-12-24 22:25:22 -05:00
5908bd1930 Move backup models to domain module 2023-12-24 18:01:58 -05:00
b9fd416fc6 Use smaller window to calculate fetch interval if there's less total chapters
This is sort of a workaround for sources that tend to only give you the first few and
most recent few chapters, which would have been 28 day intervals before due to
the big gap in the middle.
2023-12-21 09:49:03 -05:00
2f2eed0235 chore: Ktlint
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-12-20 22:49:19 +11:00
178b00280b feat: added triggers for syncing.
Experimental for now, but works fine so far, I don't know about google api limit but I think it's pretty generous.

Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-12-20 22:12:46 +11:00
18fb63cd01 chore: merge upstream. 2023-12-20 02:46:21 +11:00
5fec881387 Clean up history restoring 2023-12-16 11:15:09 -05:00
36f400d542 Fix download indexing with changed storage locations
Fixes #10218
2023-12-15 18:44:37 -05:00
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
3532074a70 Merge branch 'master' into sync-part-final 2023-12-15 07:01:37 +11:00
f7c5b42435 More onboarding screen additions 2: Electric Boogaloo 2023-12-09 18:20:58 -05:00
ab9a26f6bd Migrate to some newer date/time APIs 2023-12-08 23:11:53 -05:00
73130bc3dd chore: merge upstream changes.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-11-30 04:36:45 +11:00
27c4db752c Actually use configured storage location for local source
Fixes #10178
2023-11-26 16:24:37 -05:00
ca54984344 Use UniFile for local source file handling 2023-11-26 16:04:37 -05:00
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
2a69a1eeb0 Merge branch 'master' of https://github.com/tachiyomiorg/tachiyomi into sync-part-final 2023-11-22 23:14:24 +11:00
bcc42dd259 Exclude some more app state preferences from backups 2023-11-21 22:11:44 -05:00
d180d1de45 fix: upstream conflict.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-11-20 17:57:04 +11:00
1fbf8ca079 Use unified storage location for automatic backups 2023-11-19 16:08:24 -05:00
695813ef7d Add unified storage location setting
Currently only using it as a replacement for the downloads location.
2023-11-19 16:04:28 -05:00
389d40ab41 Merge branch 'master' of https://github.com/tachiyomiorg/tachiyomi into sync-part-final 2023-11-20 07:49:10 +11:00
976841605e refactor: remove the redundant syncPrefs
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-11-20 07:45:39 +11:00
e3b70ca08d Remove max automatic backups setting
We just always create up to 4 now to simplify it, given the addition of syncing
is going to make this section pretty busy.
2023-11-19 15:18:15 -05:00
71872ead81 refactor: clean up.
- Removed SyncDevice, device name since it's not used anymore by syncyomi server.
- Removed SyncStatus, used internally in the server doesn't need the data to be sent from tachi app.
- This way we just keep the manga data/backup that we can send to many services more generic.

Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-11-14 17:44:15 +11:00
38609e8907 chore: lint.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-11-14 16:09:33 +11:00
0016f1e335 fix: merge conflict.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-11-14 14:09:17 +11:00
a08a815022 Refactor: Replace Certain SyncPreferences with appStateKey
- Revised several fields to utilize `appStateKey` for enhanced state management.
- Modified notification behavior:
  - Removed frequent 'sync completed' notifications to reduce redundancy.
  - Notifications now trigger only on sync errors, streamlining user alerts.

- Users should refer to the 'last sync timestamp' to verify successful synchronizations.
- The timestamp updates only when syncs complete successfully, providing a reliable success indicator.

Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-11-14 14:04:05 +11:00
4a6571d310 Minor cleanup 2023-11-11 18:25:27 -05:00
bdf6839291 chore: lint.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-11-10 00:12:09 +11:00
df546caaa0 refactor: lint.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
2023-11-10 00:07:25 +11:00
d0eaf5e3cb chore: merge upstream. 2023-11-09 23:37:56 +11:00
b97aa23548 Implement scanlator filter (#8803)
* Implement scanlator filter

* Visual improvement to scanlator filter dialog

* Review changes + Bug fixes

Backup not containing filtered chapters and similar issue fix

* Review Changes + Fix SQL query

* Lint mamma mia
2023-11-05 10:34:35 -05:00
1d144e6767 Restrict line length with ktlint 2023-11-04 23:28:41 -04:00
3a15c6b843 Show EOL message if update check no-ops due to unsupported Android version 2023-11-04 20:26:47 -04:00
Ota
f30ab56fd0 New alphabetical chapter sort (#10073)
* added alphabetical chapter sorting

* Deleted sort_by_alphabet and re-utilized action_sort_alpha

* Accidentally deleted wrong string. Now solved

* Accidentally deleted wrong string. Now solved

Deleted sort_by_source instead of sort_by_alphabet in strings.xml.
Now reverted.

* Alphabetical sorting now uses Collator

* Clean up repeated Collator instances

---------

Co-authored-by: arkon <eugcheung94@gmail.com>
2023-11-04 15:47:32 -04:00
5d91b77c93 Added library sort by mean Tracker score (#10005) 2023-11-04 15:31:59 -04:00