These are basically 1-to-1 replacements for the existing RxJava APIs.
This will make the initial migration off of RxJava simpler. We'll
revisit the actual call flows in followup versions of the API.
(cherry picked from commit 26c5d761da4ba577481f41e63f03952b8a6c323f)
# Conflicts:
# data/src/main/java/tachiyomi/data/source/SourcePagingSource.kt
# source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSource.kt
# source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSourceFetcher.kt
We use the application ID now to ensure uniqueness if the same folder is selected
between different app versions/forks. This will make more sense once storage
settings are unified to a single location.
Also changes the file extension while we're at it so people stop accidentally
ungzipping it.
(cherry picked from commit cc018cee182f880ebfe07e45809a98d0f6d73220)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/data/backup/models/Backup.kt
Closes#9834
Individual tracker implementations already handle setting it too on update.
(cherry picked from commit 8a6a104987738c7251097f172d24aa7235a86e96)
Fix bug of not fetch update if manual library refresh, no auto
If somehow manga missed check period, we would not give new next update cycle and it would forever left behind
(cherry picked from commit d874f20362217bf1752b16f513143f1f83972f69)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt
* Add support to kotlin.time APIs in the rate limit interceptor.
* Add a missing line break in the doc.
* Move the specific host to the same file.
* Add kotlin.time rule to Proguard and remove specific host rule.
* Mark the old version as deprecated and address review.
* Remove unused import.
* Remove yet another unused import.
(cherry picked from commit 9b6567f5e4bfa4b8a4845400216551fd28545094)
* Add Predict Interval Test
* Get mangas next update and interval in library update
* Get next update and interval in backup restore
* Display and set intervals, nextUpdate in Manga Info
* Move logic function to MangeScreen and InfoHeader
Update per suggestion
---------
Co-authored-by: arkon <arkon@users.noreply.github.com>
(cherry picked from commit cb639f4e90121b98221ba7358108200c46b6657f)
# Conflicts:
# app/src/main/java/eu/kanade/presentation/manga/components/MangaDialogs.kt
# app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestorer.kt
# app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt
* refactor: backup and restore to support cross device sync.
* chore: Updated string resources
* refactor: change function name.
* refactor: Use URI SyncHolder.kt not needed anymore.
(cherry picked from commit 7b2764e8f70ff4564fb744f48c1c53692f55f289)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupManager.kt
# app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestorer.kt
* feat: added migrations.
* feat: create triggers, account for new installs.
* feat: update mappers to include the new field.
* feat: update backupManga and backupChapter.
Include the new fields to be backed up as well.
* feat: add sql query to fetch all manga with `last_favorited_at` field.
* feat: version bump.
* chore: revert and refactor.
* chore: forgot to lower case the field name.
* chore: added getAllManga query as well renamed `fetchMangaWithLastFavorite` to `getMangasWithFavoriteTimestamp`
* chore: oops that's not meant to be there.
* feat: back fill and set last_modified_at to not null.
* chore: remove redundant triggers.
* fix: build error, accidentally removed insert.
* fix: build error, accidentally removed insert.
* refactor: review pointer, make fields not null.
(cherry picked from commit a577f5534f31086174b1cc851d8b489d69f557e8)
# Conflicts:
# app/build.gradle.kts
# app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupManga.kt
# data/src/main/java/tachiyomi/data/manga/MangaMapper.kt
# data/src/main/sqldelight/tachiyomi/data/mangas.sq
# data/src/main/sqldelight/tachiyomi/migrations/25.sqm
# domain/src/main/java/tachiyomi/domain/manga/model/Manga.kt
* Dialog for service tracker removal added, anilist query prepared
* added API delete requests for Mal and Kitsu
* implement and fix tracker delete for anilist, shikimori, mangaupdates
* implement and test mal delete request
* Update to dialog text to reflect current tracker
* finish kitsu api request and block bangumi tracker removal
* Change delete flag into interface, localise strings, clean up logs
* Add shikimori delete compatibility for already existing entries
* update track delete dialog prompt to include checkbox, update strings
* Update i18n/src/main/res/values/strings.xml
Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
* Update i18n/src/main/res/values/strings.xml
---------
Co-authored-by: unknown <zaghdane@fireflow.de>
Co-authored-by: arkon <arkon@users.noreply.github.com>
Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
(cherry picked from commit b36b3bfcabd4a33826b455e1cdfc06fde110a452)
Similar to J2K. This only applies on Android 12+.
(cherry picked from commit ee95c1439f8c47d912c88bd9ebb442e64a89f8ff)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/MigrateDialog.kt
* Rename removeFromQueueByPredicate to removeFromQueueIf
Follow-up to PR comment in #9511
* Make Download hashCode stable
Mutating pages would previously change the Download hashCode, which
breaks HashMap lookups.
* Convert Donwloader subscription to coroutine
Replace downloadsRelay with activeDownloadsFlow. Instead of managing
a PublishRelay independent from the queue, derive a Flow of active
downloads directly from the queue StateFlow. (This will allow
updating the queue without pausing the downloader, to be done in a
follow-up PR.)
When a download completes successfully, the downloads is removed from
queueState. This updates activeDownloadsFlow and causes the
downloaderJob start the download job for the next active download.
When a download fails, the download is left in the queue, so
queueState is not modified. To make activeDownloadsFlow update
without a change to queueState, use transformLatest and use the
Download statusFlows to suspend until a download reaches the ERROR
state.
To avoid stopping and starting downloads every time
activeDownloadsFlow emits a new value, maintain a map of current
download Jobs and only start/stop jobs in the difference between
downloadJobs and activeDownloads. To make sure all child download
jobs are cancelled when the top-level downloader job is cancelled,
use supervisorScope.
* Remove obsolete main thread references in Downloader
Thread safety of the queue state used to be guaranteed by running all
queue mutation on the main thread, but this has not been true for
some time. Since the queue state is now backed by a StateFlow,
queueState can be safely updated by any thread.
(cherry picked from commit 3ae1e37c40fcfa43798377d2d9b8af58ec4498db)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt
* Implemented local cover encryption and made coil capable of reading encrypted cover archives
* add check that the file is not an image before determining that it is a zip file
Fetch each source image URL immediately before downloading each image
instead of fetching all URLs and then downloading all images.
Source image URLs may change, so the downloader may fail if there is
too long a delay between fetching the image URL and downloading the
image.
(cherry picked from commit bbe0ab1dd0b51bcb91ff0a7f78555b078d73201e)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt