* 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.
* Serialize whole chapter numbers without decimal point and add library categories to genre
* added Tachiyomi specific ComicInfo Category field
* lint
* implemented requested changes
* 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>
* 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.
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.
* change the directory's name for a download when the chapter's name is only composed of numbers or is blank
* maj in case the chapter name is blank or empty
* clean code
This partially reverts commit 2769525b2c.
Keeps the change to silently ignore spliting errors since it falls back to
the original images in those cases.
Downloader.stop is now the sole responsible for stopping the
DownloadService. This will help cleanly removing
DownloadService.stop when migrating to coroutines.
* Rename functions for DownloadService internal use
* Call DownloadService.start via DownloadManager
* Inline DownloadService.stop into pauseDownloads
* Inline DownloadService.stop into clearQueue
NotificationReceiver will now also stop the DownloadService when
receiving ACTION_CLEAR_DOWNLOADS.
* Provide DownloadService.isRunning via DownloadManager
1:1 translation from the RxJava implementation, should match the
previous behavior.
Dropped the return value from functions of the form
```
fun foo(t: T, ...): Observable<T>
```
where the Observable produced the original argument `t`.
The caller already has the result if necessary.
While this conversion is not flow-based overall, some sections use
flows to use the flatMapMerge and retryWhen operators.
Removed RetryWithDelay as it was only used here.
Inlined fetchAllImageUrlsFromPageList instead of converting it to a
suspending equivalent. fetchAllImageUrlsFromPageList is no longer
used in the app, but was not removed as it is part of source-api.
(However, it does not seem to be used exposed in extensions-lib or
used in tachiyomi-extensions.)
runBlocking is used as a temporary stop-gap.
When restarting a download, the page count would display as 0 until
the first page download completion, after all the existing pages were
rechecked.
To fix, calculate downloadedImages from pages instead of relying on
the downloader to reset and increment the count.
Includes side effects:
- No longer need to restart app for user agent string change to take effect
- parseAs extension function requires a Json instance in the calling context, which doesn't necessarily need to be the default one provided by Injekt