* feat: add cross device sync.
* chore: add google api.
* chore: add SY specifics.
* feat: add backupSource, backupPref, and "SY" backupSavedSearches.
I forgot to add the data into the merging logic, So remote always have empty value :(. Better late than never.
* feat(sync): Allow to choose what to sync.
Various improvement and added the option to choose what they want to sync. Added sync library button to LibraryTab as well.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
* oops.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
* refactor: fix up the sync triggers, and update imports.
* refactor
* chore: review pointers.
* refactor: update imports
* refactor: add more error guard for gdrive.
Also changed it to be app specific, we don't want them to use sync data from SY or other forks as some of the model and backup is different. So if people using other forks they should use the same data and not mismatch.
* fix: conflict and refactor.
* refactor: update imports.
* chore: fix some of detekt error.
* refactor: add breaks and max retries.
I think we were reaching deadlock or infinite loop causing the sync to go forever.
* 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 migrations
* chore: version and is_syncing fields.
* chore: add SY only stuff.
* fix: oops wrong index.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
* chore: review pointers.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
* chore: remove the option to reset timestamp
We don't need this anymore since we are utilizing versioning system.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
* refactor: Forgot to use the new versioning system.
I forgot to cherry pick this from mihon branch.
* chore: remove isSyncing from Chapter/Manga model.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
* chore: remove unused import.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
* chore: remove isSyncing leftover.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
* chore: remove isSyncing.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
* refactor: make sure the manga version is bumped.
When there is changes in the chapters table such as reading or updating last read page we should bump the manga version. This way the manga is synced properly as in the History and last_read history is synced properly. This should fix the sorting issue.
Signed-off-by: KaiserBh <kaiserbh@proton.me>
---------
Signed-off-by: KaiserBh <kaiserbh@proton.me>
* Change preferences containing passwords to appStateKeys
* Change versionCode to 65
* fix merge conflict and add instructions to get library back after migration
* 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>
(cherry picked from commit 4ae9dbe52487185ef9ee25f58fabe5025bb2278b)
# Conflicts:
# app/build.gradle.kts
# app/src/main/java/eu/kanade/tachiyomi/data/backup/create/creators/MangaBackupCreator.kt
# app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupChapter.kt
# app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupManga.kt
# data/src/main/java/tachiyomi/data/chapter/ChapterRepositoryImpl.kt
# data/src/main/sqldelight/tachiyomi/migrations/2.sqm
# domain/src/main/java/tachiyomi/domain/manga/model/MangaUpdate.kt
* Fix#493
Fetch the current userid separately because shizuku always runs as the main user and would otherwise install and update for the main user
* Update app/src/main/java/eu/kanade/tachiyomi/extension/installer/ShizukuInstaller.kt
---------
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit 402e579a69391e7633754066eb8e6480bd9f247d)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/extension/installer/ShizukuInstaller.kt
* Fix DelayedTrackingUpdateJob spam on update errors
DelayedTrackingUpdateJob would start spamming when it encountered an
error (e.g. a tracker has an issue) and never stop.
This seems to stem from a circular dependency between the Job's
`doWork` and TrackChapter's `await`.
TrackChapter sets up a completely new instance of the
DelayedTrackingUpdateJob if any Exception was thrown during the track
update.
This causes the Job to get replaced (as per the WorkManager's set
ExistingWorkPolicy).
Because of this, the guard clause at the start of doWork would never
trigger, as all instances of the Job would report being the 0th try
(because they were completely new instances).
This simple fix introduces a boolean `isRetry` parameter to
TrackChapter's await method, which is set to `false` by default.
DelayedTrackingUpdateJob however sets this parameter to `true`, which
means TrackChapter won't try to set up the Job again.
* Rename isRetry parameter to setupJobOnFailure
This also inverts the logic, so true & false were swapped.
(cherry picked from commit 617bf491eee1d1010dc23c3f6df5d148700feb44)
Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
(cherry picked from commit f72b6e4d7c1f2f93d705402e4d80c94160bef54d)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/App.kt
# app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt
* Made some changes to ComicInfo metadata
The web field now contains a " " separated list of source and tracker urls.
The translator field will now use the source name if the scanlator field is empty.
* lint
* use already existing source instance
* made translator not nullable
* implemented requested changes
created new Mihon exclusive ComicInfo source field and populated it with SourceName
reverted previous changes to translator field
* Update core-metadata/src/main/java/tachiyomi/core/metadata/comicinfo/ComicInfo.kt
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
* Update app/src/main/java/eu/kanade/domain/manga/model/Manga.kt
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
* Update app/src/main/java/eu/kanade/domain/manga/model/Manga.kt
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
* Update app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
* Update app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt
---------
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit 4bfc5e7b51452a1a9cac3a3644e6343d1c47aa95)
# Conflicts:
# app/src/main/java/eu/kanade/domain/manga/model/Manga.kt
# app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt
# core-metadata/src/main/java/tachiyomi/core/metadata/comicinfo/ComicInfo.kt
* Allow disabling reader's zoom out (#62)
* Renamed disable zoom out pref and string
* Zoom to default rate if the scale is inferior
* Fixed null value check and formatting
* Fixed detekt
(cherry picked from commit c15f3f2fd5b11cc9c2088ae2fa444f4fe35ea740)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderPreferences.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonFrame.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt
* Fixed extra header introduced in 7ff95e2
* Removed parentheses to make detekt happy
* Updated relative date display for dates in the future
* Small cleanup for header creation logic
* replaced "and" with "&&" for better formatting
(cherry picked from commit 07f963d5ae16c3c8d7be025a7e9439ad2110ac71)
* Fix DelayedTrackingUpdateJob spam on update errors
DelayedTrackingUpdateJob would start spamming when it encountered an
error (e.g. a tracker has an issue) and never stop.
This seems to stem from a circular dependency between the Job's
`doWork` and TrackChapter's `await`.
TrackChapter sets up a completely new instance of the
DelayedTrackingUpdateJob if any Exception was thrown during the track
update.
This causes the Job to get replaced (as per the WorkManager's set
ExistingWorkPolicy).
Because of this, the guard clause at the start of doWork would never
trigger, as all instances of the Job would report being the 0th try
(because they were completely new instances).
This simple fix introduces a boolean `isRetry` parameter to
TrackChapter's await method, which is set to `false` by default.
DelayedTrackingUpdateJob however sets this parameter to `true`, which
means TrackChapter won't try to set up the Job again.
* Rename isRetry parameter to setupJobOnFailure
This also inverts the logic, so true & false were swapped.
(cherry picked from commit 617bf491eee1d1010dc23c3f6df5d148700feb44)
This function is deprecated starting with API 34 "UpsideDownCake" and
should be replaced with `overrideActivityTransition`.
(cherry picked from commit 840b647b4b4e738fac546b7437dd5449679232a1)
* Add support for localdate based relative times
* Update History Screen to use new localdate based relative times
* Update Updates Screen to use new localdate based relative times
* Cleaned up date util classes
* Updated build time display
* Code cleanup
* Fixed crash in settings
* Updated Preferences item
* Worker Info works
* Fixed Tracker date display
* Code changes to pass detekt
(cherry picked from commit 7ff95e21babda98dd1b479912278d6029cd15f0d)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/ui/history/HistoryScreenModel.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/updates/UpdatesScreenModel.kt
# app/src/main/java/eu/kanade/tachiyomi/util/lang/DateExtensions.kt
* Minor refactor of theming when expressions
Avoids triggering detekt's CyclomaticComplexMethod warning because of
too many when branches, which would happen with one more theme being
added in these two locations.
In TachiyomiTheme, the Monet theme is separated because it requires
the current Compose context to function. The other themes do not and
are delegated to a Map.
* Implement requested changes
- moved themeResources out of the ThemingDelegate interface
- replaced single condition when with if expression
(cherry picked from commit 96c236e5c38248c875f2ac7596cd51845aa651ea)