Commit Graph

1390 Commits

Author SHA1 Message Date
Ivan Iskandar
e20c66b156
App state banner tweaks (#8746)
* Move download indexing notification to this banner group
* Animate state changes
2022-12-16 22:18:17 -05:00
arkon
9dd9e741f3 Convert download cache/queue flows into SharedFlows
Fixes #8727
2022-12-12 22:37:37 -05:00
Two-Ai
6ca32710be
Cleanup Page status (#8696)
* Cleanup Page statusSubject and statusCallback

* Convert Page status from Int to enum
2022-12-07 18:28:38 -05:00
arkon
c88b79fa17 Minor cleanup 2022-12-05 14:14:50 -05:00
arkon
696dc59ea5 More domain model migrations 2022-12-03 22:54:18 -05:00
Two-Ai
5f6666a438
Migrate Download to domain model (#8664) 2022-12-03 22:30:30 -05:00
AntsyLich
373463e995
Change Updates icon badge to show new updates count (#8659)
* Change Updates icon badge to show new updates count

* Fix reference

* review changes

* Lint
2022-12-03 14:44:30 -05:00
Ivan Iskandar
3d66eaea83
Merge Voyager screens (#8656)
* Merge Voyager screens

* cleanups
2022-12-02 22:35:30 -05:00
AntsyLich
ba91b483a0
Delayed Tracking Update related fix (#8642)
* Delayed Tracking Update related fix

* Lint
2022-12-01 23:01:24 -05:00
arkon
5fbecfd7b7 Don't remove queued downloads when deleting manga after chapter deletion 2022-11-27 17:12:45 -05:00
arkon
3480b45098 Minor cleanup 2022-11-27 17:12:45 -05:00
AntsyLich
3d7591feca
Implement simple stats screen (#8068)
* Implement simple stats screen

* Review Changes

* Some other changes

* Remove unused

* Small changes

* Review Changes 2 + Cleanup

* Review Changes 3

* Cleanup leftovers

* Optimize imports
2022-11-26 15:50:26 -05:00
arkon
37118088d4 Remove usage of PublishRelay in DownloadQueue 2022-11-26 10:07:51 -05:00
AntsyLich
758d223776
Disable generating ComicInfo.xml on download (#8619)
* Disable generating ComicInfo.xml on download

* Remove unused import
2022-11-26 09:13:08 -05:00
arkon
a54d9912d0 Fix Kavita interceptor crashing app + minor cleanup 2022-11-25 23:03:42 -05:00
arkon
7e74949d38 Explicitly add READ_APP_SPECIFIC_LOCALES permission
Some devices are throwing a SecurityException (calling getApplicationLocales) for some reason.
2022-11-25 23:03:42 -05:00
AntsyLich
0347d3970a
Cleanup [Downloader.ensureSuccessfulDownload] (#8602) 2022-11-23 09:23:29 -05:00
arkon
5c37347cec Delete empty source folder when deleting all downloads for a manga
It previously only attempted this after deleting a list of chapters, so it wasn't applicable
when deleting from Library or after unfavoriting an entry.

Closes #8594
2022-11-22 09:25:00 -05:00
arkon
2d86f69caa Add reindex downloads description
Closes #8546
Also disable sound for the notification and cancel running indexing job if invalidating.
2022-11-20 14:29:56 -05:00
AntsyLich
ba2a528886
Fix related to cancelling queued chapters (#8528)
Tachi removes the downloaded chapter (if it exists) when you just cancelled a download from queue.

PR fixes that

Also removes redundant return
2022-11-18 22:27:39 -05:00
arkon
f5873d70c6 Don't rely on cache when deleting empty manga folders
In case the cache hasn't actually been indexed yet. Maybe fixes #8438.
2022-11-14 22:42:36 -05:00
arkon
9da232dcd8 Adjust download cache to ignore irrelevant files
Fixes #8530
2022-11-13 11:52:11 -05:00
AntsyLich
51c964de3a
Fix download not working on sd card (#8527)
Also create comicinfo file inside chapter folder instead of manga folder since it also contains some chapter specific data
2022-11-13 10:40:33 -05:00
arkon
262f8449b4 Resolve proper chapter URL for ComicInfo "Web" field
Requires extensions to be updated to lib 1.4 to have proper URLs for some of them, which will
happen soon in the future.
2022-11-12 09:54:32 -05:00
arkon
6ada3c90ff Clean up ComicInfo stuff a bit 2022-11-11 16:34:18 -05:00
Shamicen
4e628fe6de
Create ComicInfo Metadata files on chapter download (#8033)
* generate ComicInfo files at the chapter root and inside CBZ archives on chapter download.

* Update app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt

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

* Improvements suggested by @ghostbear

* now creates ComicInfo files in normal chapter folders as well
use manga directly instead of converting it to SManga
truncate old files before overwriting them

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>

* remove empty line after resolving merge conflict

* fixes Serializer for class 'ComicInfo' is not found error

* some changes to comments and variable names

* Revert leftover changes to archiveChapter() function

* minor cleanup

* Changed Chapter to SChapter

Co-authored-by: Andreas <andreas.everos@gmail.com>
Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
2022-11-11 16:16:37 -05:00
ThePromidius
92b039fac7
Add Kavita tracker (#7488)
* Added kavita tracker

* Changed api endpoint since tachiyomi has it's own. Moved some processing to backend

* Bugfix. Parsing to int instead of float

* Ignore DOH, update migration and cleanup

* Fix Unexpected JSON token
	modified:   app/src/main/java/eu/kanade/tachiyomi/data/track/TrackManager.kt
	modified:   app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/KavitaApi.kt
	modified:   app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/KavitaModels.kt

* Apply code format suggestions from code review

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

* Apply simplified code suggestions from code review

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

* Removed unused dtos

* Use setter instead of function to get apiurl

* Added Interceptor

* Handle not configured/not accesible sources

* Unused import

* Added kavita to new tracking settings screen

* Delete SettingsTrackingController.kt to solve conflict

* Review comments
* Removed break lines from log messages
* Fixed jwt typo

* Merged enhanced services compatibility warning message to be more generic.
* Updated Komga String res to use new formatted one
* Added Kavita String res to use formatted one

* Apply suggestions from code review - hardcoded strings to track name

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

Co-authored-by: Andreas <andreas.everos@gmail.com>
2022-11-11 15:19:41 -05:00
arkon
a0f49b16c5 Remove "Download complete" notification
It wasn't really consistent with other notifications considering there's no
action to be taken in this state.
2022-11-10 23:08:19 -05:00
arkon
c6c4c1c393 Migrate to more domain model usages 2022-11-10 22:42:44 -05:00
arkon
811931ccc0 Minor cleanup 2022-11-10 22:23:34 -05:00
AntsyLich
08d5633d81
Add option to invalidate download cache (#8491)
* Add option to invalidate download cache

* Review changes + lint
2022-11-10 22:15:35 -05:00
Ivan Iskandar
18ccde082d
Full Compose MangaController (#8452)
* Full Compose MangaController

* unique key

* Use StateScreenModel

* dismiss

* rebase fix

* toShareIntent
2022-11-09 22:31:56 -05:00
Alessandro Jean
6d880c938a
Retry the MAL request if the token is expired (#8437)
Retry the MAL request if the token expired.
2022-11-04 22:54:52 -04:00
arkon
fc184f1cfa Clean up download ahead logic
- Remove redundant chapter sorting logic when fetching next chapter(s)
- Remove redundant download queue checks (it'll handle already queued or downloaded items)
- Trigger download ahead when read >= 25% of chapter rather than 20%
- Rely on download cache when checking if next chapter is downloaded to avoid jank (fixes #8328)
2022-10-30 16:59:33 -04:00
arkon
725fcbba0e Add warning about F-Droid build support in More screen 2022-10-30 16:00:19 -04:00
stevenyomi
4b60138d41
Clean up strings and icons (#8326)
* Clean up strings and icons

* fix incorrect usages of label_more

* restore strings and reduce usage of android.R

* removing icon desc of FABs anyway as app's not for visual impaired users
2022-10-29 11:43:51 -04:00
arkon
fde7bfa3d1 Show notification while download cache is renewing
Since users seem to be confused now that the library loads before download info is shown...
2022-10-29 11:39:04 -04:00
AntsyLich
6e4a30e593
Fix "Download split" not working while using SD card (#8305)
* Fix "Download split" not working while using SD card

* Update app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt

Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-10-28 11:40:43 -04:00
arkon
ca06516900 Avoid some crashes 2022-10-26 18:12:11 -04:00
AntsyLich
3b5b9a1ae5
Use Channel in Download cache (#8292)
* Use `Channel` in Download cache

Co-Authored-By: Andreas <6576096+ghostbear@users.noreply.github.com>

* Use Unlimited capacity

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
2022-10-26 09:21:35 -04:00
arkon
5c868d7846 Use kotlin.time extensions in some more places 2022-10-22 19:57:55 -04:00
AntsyLich
4ff5c1148e
Cleanup LibraryUpdateService (#8237) 2022-10-22 15:16:44 -04:00
arkon
152eb5b951 Handle async cache in updates and manga screens
- Also fix concurrent accesses to main cache map
- Also debounce sources and updates list updates to maybe avoid crashing due to dupe LazyColumn keys
2022-10-22 10:50:44 -04:00
arkon
7e40680af0 Perform download cache renewal async
Don't block on cache renewals, but notify library on updates so that the badges show up when ready.

We skip the cache when checking if a chapter is downloaded for the reader assuming that it's a
relatively low cost to check for a single chapter.

(Probably) fixes #8254 / fixes #7847
2022-10-21 15:00:41 -04:00
arkon
b04807e53a Proper DI instantiation for some more download related classes 2022-10-21 14:29:44 -04:00
arkon
93827aba34 Defer library download counts if not needed 2022-10-20 23:20:32 -04:00
arkon
a8ca7b690f Avoid crashing if invalid download and backup location is set
Fixes #8252
2022-10-20 22:34:27 -04:00
Ivan Iskandar
84bcd8d1d2
Fix crash when saving a page from certain chapters (#8242) 2022-10-19 07:59:05 -04:00
arkon
6756bfab75 Fix download cache not updating on location change 2022-10-18 17:35:38 -04:00
stevenyomi
2d19729869
Clean up OkHttp methods and parse from Okio directly (#8238) 2022-10-18 12:09:23 -04:00
arkon
558aad1a71 Always renew download cache if no sources have been loaded yet
Fixes #7705. Somewhat janky solution to handle when loading the sources on app start is slower than
the initial download cache priming.
2022-10-16 16:30:51 -04:00
arkon
bc1fbfac9d Minor cleanup 2022-10-14 16:13:50 -04:00
arkon
26a42ba9c0 Upgrade to Kotlin 1.7.20
Also run formatter and address some deprecation warnings.
2022-10-11 22:40:08 -04:00
stevenyomi
b1e104319f
Fix download progress indicator (#8188) 2022-10-11 22:17:45 -04:00
Platiplus
a3afb35539
Overwrite saved images instead of creating new ones (#8162)
* Implementing overwrite instead of saving duplicated images

* Using filename instead of hardcoding image type

* Refactoring method to accept lambda for default value

* Removing extra parenthesis
2022-10-11 08:20:30 -04:00
arkon
b95a30e424 Fix linting error 2022-10-09 10:54:54 -04:00
arkon
3bfbd58402 Clean up download state logic in MorePresenter 2022-10-09 10:37:44 -04:00
AntsyLich
ea8383978b
Move LibraryManga to domain layer (#8126) 2022-10-01 11:30:51 -04:00
AntsyLich
98c459a6b6
Downloader: Don't trust index provided by source (#8122) 2022-10-01 11:01:05 -04:00
AntsyLich
ad84a8c3e9
Improve DelayedTrackerStore (#8109)
* Improve DelayedTrackerStore

* Review changes
2022-09-29 09:20:07 -04:00
stevenyomi
f4c684b4b8
Remove cache control on already cacheless image request (#8085) 2022-09-26 17:13:03 -04:00
arkon
ec272f6c4e Fix date added when adding from browse source
Fixes #8059
2022-09-25 13:09:25 -04:00
Alessandro Jean
ba533f30ce
Add support to update strategy on global update (#7902)
* Add support to update strategy.

* Add JavaDoc and bump the LIB_VERSION_MAX constant.

* Fix a word typo.

* Store update strategy enum as integer in the DB.
2022-09-25 10:12:36 -04:00
Andreas
29fa93e829
Split the rest of the preferences in PreferencesHelper (#8074)
* Split the reset of the preferences in PreferencesHelper

* Capitalize ThemeMode
2022-09-25 10:07:06 -04:00
Ivan Iskandar
f98b4f4e39
DownloadController: Fix first active download status not updating (#8069) 2022-09-24 11:59:11 -04:00
Andreas
b5dca2eb09
Move chapter preferences from PreferencesHelper to LibraryPrefrences (#8061) 2022-09-24 10:14:16 -04:00
Andreas
5cdcc1679f
Split backup preferences from PreferencesHelper (#8051) 2022-09-22 08:57:42 -04:00
arkon
b37b3767f3 Minor cleanup
Also add POST_NOTIFICATIONS permissions to make Android Studio stop complaining about it.
2022-09-21 22:39:32 -04:00
Andreas
e82963c9ef
Split download preferences from PreferencesHelper (#8048) 2022-09-21 17:45:07 -04:00
Andreas
e568951396
Split track preferences from PreferencesHelper (#8046) 2022-09-21 09:18:53 -04:00
Andreas
e275897bf9
Split reader preferences from PreferencesHelper (#8042) 2022-09-20 08:36:57 -04:00
arkon
2b089648a3 Remove redundant preference keys 2022-09-20 00:13:33 -04:00
Andreas
c740558327
Split library preferences from PreferencesHelper (#8036) 2022-09-19 23:55:07 -04:00
arkon
7ec822503a Catch error properly when app update check fails (fixes #8019) 2022-09-18 16:24:26 -04:00
Andreas
b668364afb
Split security preferences from PrefrencesHelper (#8030) 2022-09-18 13:07:48 -04:00
Andreas
30b3b2d3ff
Split source preferences from PreferencesHelper (#8029) 2022-09-18 10:36:41 -04:00
Andreas
0086743a53
Use 1.x preference abstraction (#8020)
* Use 1.x preference abstraction

- Uses SharedPreferences compared to 1.x impl which uses DataStore but it breaks all settings screens currently
- Move PreferencesHelper to new PreferenceStore
  - PreferencesHelper should be split into smaller preference stores and be in core or domain
- Remove flow preferences as new PreferenceStore handles changes for us

Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com>

* Fix PreferenceMutableState not updating

* Fix changes not emitting on first subscription

Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com>
2022-09-17 11:48:24 -04:00
arkon
829aadd0bd Always attempt automatic backup creation
- Defaults to every 12 hours
- Minimum number of backups is now 2, just to offer some level of redundancy in case something happens
- If it's missing storage permissions, it'll fail but that's the user's loss if they somehow haven't granted that permission yet
2022-09-15 22:53:46 -04:00
Andreas
86fe850794
Extract source api from app module (#8014)
* Extract source api from app module

* Extract source online api from app module
2022-09-15 18:12:27 -04:00
stevenyomi
52fa28c16a
Prevent okhttp from caching covers and chapter images (#7967) 2022-09-11 18:00:07 -04:00
arkon
f9bbbce466 Check the actual folder when deleting source folder in case of stale cache 2022-09-11 17:58:59 -04:00
arkon
cd3cb72b65 Bump dependencies + linting 2022-09-10 23:57:03 -04:00
Ivan Iskandar
fb9791f597
DownloadController: Partial Compose conversion (#7969)
Item list is not changed as currently there is no fitting Compose component to
replace the drag-drop behavior.
2022-09-09 22:29:40 -04:00
nzoba
07d1b9f3ba
Fix download ahead missing out 1 chapter (#7927)
* Fix download ahead missing out 1 chapter

* Move toLong() function

* Add check whether the next chapter is queued
2022-09-09 22:29:24 -04:00
arkon
26d8e47bb9 Bump default user agent string 2022-09-04 18:01:02 -04:00
arkon
38950f7bc8 Address some OkHttp nullability changes 2022-09-03 10:38:56 -04:00
AntsyLich
5a320d87e8
Remove download source folder when empty (#7928) 2022-09-03 09:18:19 -04:00
Ivan Iskandar
774a87a42a
Adjust app lock mechanism (#7924)
Now uses enum to also handle timed lock
2022-09-02 11:48:48 -04:00
AntsyLich
a43754e1a6
Fix tmp cbzs are counted towards manga download count (#7909)
* Fix tmp cbzs are counted towards manga download count

* Review Changes

* Review Changes 2
2022-09-02 10:03:37 -04:00
arkon
c39a1b7867 Minor cleanup 2022-08-31 14:43:58 -04:00
Andreas
d4b764fa31
Use Compose on BrowseSourceScreens (#7901) 2022-08-31 14:41:35 -04:00
Alessandro Jean
084e6a964e
Enable sub-languages on app first run (#7127)
* Enable sub-languages on app first run.

* Fix wrong language code string parsing.

* Fix some build issues due to rebase.

* Use PreferenceHelper and remove an extra preference.

* Remove a constant.
2022-08-30 15:37:15 -04:00
AntsyLich
53f5ea7fe9
Rename source download folder on source rename (#7898)
* Rename source download folder on source rename

* Review Changes

* Review Changes 2
2022-08-30 13:15:34 -04:00
arkon
f5c7aa1142 Convert settings main and search views to full Compose 2022-08-29 16:39:35 -04:00
arkon
43c195e14a Add last update time to Updates Tab (closes #5466)
Co-authored-by: datreesezcup <datreesezcup@users.noreply.github.com>
2022-08-29 14:57:25 -04:00
Andreas
880407442c
Tweak flag classes for Library (#7829)
* Tweak flag classes for Library

- Add interface for Flag and Mask
- Merge Sort Type and Direction into one class
- Use custom serializers for preferences
  - Mainly to not break the old

* Review changes
2022-08-29 13:10:30 -04:00
Andreas
a83d29f058
Add APK output for x86_64 CPU architecture (#7885)
* Add APK output for x86_64 CPU architecture

* Review changes

* Fix formatting

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>

* Use underscore instead of hyphen

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
2022-08-28 09:45:33 -04:00
AntsyLich
88b56121a3
Long Strip Split for Webtoon (#5759)
* Long Strip Split for Webtoon

* Review Changes

* Review Changes 2 + Rebase
2022-08-27 11:41:18 -04:00
stevenyomi
4b9a6541d1
Fix chapter download with empty scanlator (#7844) 2022-08-24 17:19:01 -04:00
nzoba
a70b848646
Fix stucked downloads when service not started (#7846)
* Fix stucked downloads when service not started

* Fix chapter download restart even if should be deleted
2022-08-24 17:18:22 -04:00
nzoba
f207e87722
Download ahead (#7226) 2022-08-22 17:37:54 -04:00
arkon
2e81e1b7d8 Reorder themes 2022-08-21 11:27:02 -04:00
Batuhan
4b0f549666
New Theme Tidal Wave (#7825)
* New Theme Tidal Wave

Added a new strong blue theme appearance to Tachiyomi titled Tidal Wave.

* Better Tertiary Color: Seafoam Green

Updated the tertiary color to be lighter and match the blue more. Also changed the active button color to contrast better.
2022-08-20 13:23:32 -04:00
stevenyomi
40749dc767
DownloadProvider: Remove duplicate in valid chapter dir name list (#7826) 2022-08-20 13:19:15 -04:00
arkon
1fe9b7bda7 Update default user agent string 2022-08-18 18:54:55 -04:00
stevenyomi
e36e9d9d5c
Remove 1.x source models (#7781) 2022-08-18 14:07:13 -04:00
Andreas
09abfc7843
Lint changes (#7802)
- Fixes current lint issues
- Changes lint task to lintKotlin on PRs
2022-08-18 14:06:32 -04:00
stevenyomi
1f34f5277c
Fix notification and add visual cues when triggering a second update (#7783) 2022-08-18 09:01:10 -04:00
stevenyomi
1f9f9662bc
Fix download chapter dir when scanlator is empty or changed (#7780) 2022-08-16 17:26:08 -04:00
AntsyLich
11f640cfee
Change return value of SyncChaptersWithSource.await() (#7715)
* Change return value of `SyncChaptersWithSource.await()`

`updatedToAdd.subtract(reAdded).toList()` never worked as at this point `updatedToAdd` contained ids from db where `reAdded` had default one. Was the same case before the rewrite.

Removed `toDelete` from return value as it was not being used anywhere

* Add doc string

* Use HashSet

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
2022-08-11 09:06:46 -04:00
arkon
d6f1534ee8 Address misc. build warnings 2022-08-10 23:26:34 -04:00
arkon
3bc6b1e202 Fix default category showing up in edit manga categories list
Also remove some usages of runBlocking
2022-08-07 11:00:51 -04:00
arkon
9f0052eceb More backup/restore code cleanup 2022-08-06 15:40:50 -04:00
arkon
a2bb81b7db Start cleaning up backup/restore code
The abstraction was useful for handling 2 systems, but it's no longer needed. Cleaning it up will make migrating to domain models easier down the line.
2022-08-05 23:11:06 -04:00
arkon
5e68fe4fe9 Make screen loading indicators more consistent 2022-08-05 22:33:52 -04:00
Andreas
914831d51f
Move default category into database (#7676) 2022-08-05 09:32:10 -04:00
Alessandro Jean
5315467908
Add missing Authorization header on MAL refresh token request (#7686)
* Add missing Authorization header on MAL refresh token request.

* Make sure to also close the response when it have failed.
2022-08-04 22:17:43 -04:00
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
stevenyomi
4efb736e56
Filter out empty genres before saving manga to database (#7655) 2022-07-31 11:18:12 -04:00
Andreas
56028aff55
Fix category exclude not working in DownloadManager (#7641) 2022-07-29 07:46:09 -04:00
AntsyLich
8ea05e852e
Fix logic of app unlock (#7569) 2022-07-21 22:23:59 -04:00
stevenyomi
3547d0142f
Fix image MIME issues that cause download errors (#7562)
* Downloader: ignore non-image MIME to prevent .bin extensions

* ProgressResponseBody: allow null content type

Co-authored-by: anenasa <84259093+anenasa@users.noreply.github.com>

Co-authored-by: anenasa <84259093+anenasa@users.noreply.github.com>
2022-07-20 09:10:41 -04:00
f1998f1998
b635f02d93
fix concurrent download (#7552)
* Fix concurrent download

* lower Concurrency

* artist Update app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt

Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>

Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
2022-07-18 13:22:09 -04:00
arkon
4ee1d72b6f Make default user agent string configurable 2022-07-14 23:01:50 -04:00
arkon
788583e66f Replace some usages of RxJava 2022-07-10 19:48:07 -04:00
arkon
0b4f3f5532 Replace deprecated ACTION_MEDIA_SCANNER_SCAN_FILE intent 2022-07-09 17:51:58 -04:00
arkon
ab1a44e108 Merge branch 'patch' 2022-07-08 16:09:19 -04:00
arkon
71e31e6c03 Add MIME type mapping for image/jxl (fixes #7117)
(cherry picked from commit 591df8abcc)
2022-07-08 08:58:46 -04:00
Osyx
17899a6d6d Add new "Lavender" theme (#7343)
* Add new "Lavender" theme

* Add light theme values for Lavender theme

* Fix order of enums

* Fix accented UI elements in set categories sheet being different colors

Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
(cherry picked from commit ad106bd884)
2022-07-08 08:56:15 -04:00
jobobby04
29ced9642d Fix downloader crash related to UnmeteredSource (#7365)
Fix crash when starting a download with chaqpters from a UnmeteredSource

(cherry picked from commit 470a576441)
2022-07-08 08:55:52 -04:00
Chris
c76a136d3f Fix global update ignoring network constraint (#7188)
* update library update network constraint logic

* add explicit 'only on unmetered network' update constraint

(cherry picked from commit 63238b388d)
2022-07-08 08:52:49 -04:00
nicki
a4515ad251 Check for app updates by comparing semver (#7100)
Instead of just checking whether the current app version *matches* with
latest app version in GitHub Releases, compare the semver from the tag
names to check whether the latter is greater and the app needs an update

Reference: semver spec #11 https://semver.org/#spec-item-11

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
(cherry picked from commit e7ed130f2a)
2022-07-08 08:48:39 -04:00
nicki
aab7795b4c 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

(cherry picked from commit 11c01235ac)
2022-07-08 08:47:51 -04:00
FourTOne5
972cd98d7b Fix removing manga from library reverts during global update (#7063)
* Fix removing manga from library reverts during global update

* Review Changes

* Review changes 2

(cherry picked from commit c4088bad12)
2022-07-08 08:47:12 -04:00
arkon
0721de5b81 Add links to website FAQ for library update and download warning notifications
(cherry picked from commit 70698e6494)
2022-07-08 08:45:48 -04:00
FourTOne5
a409fde519 Download new chapters when only excluded categories is selected (#6984)
(cherry picked from commit 06bec0ad54)
2022-07-08 08:45:29 -04:00
arkon
8e34a30dce Fix skipped library entries and size warning notifications using same ID
(cherry picked from commit 91ed3a4a5f)
2022-07-08 08:43:55 -04:00
arkon
ba43462041 Fix update warning notifications being cut off (fixes #6983)
(cherry picked from commit 20145f7a12)
2022-07-08 08:43:47 -04:00
arkon
c8ae936ce9 Default to downloading as CBZ (closes #6942)
Generally seems fine. People with weak devices may experience some issues, but they can toggle it off/extract the archives separately if needed.

(cherry picked from commit 883945e3e8)
2022-07-08 08:43:39 -04:00
arkon
853f949140 Add battery not low restriction for global updates (closes #6980)
(cherry picked from commit 3feea71146)
2022-07-08 08:43:31 -04:00
arkon
591df8abcc Add MIME type mapping for image/jxl (fixes #7117) 2022-07-03 22:33:15 -04:00
arkon
a3378e6080 More domain model usage 2022-07-03 16:51:11 -04:00
arkon
3791d82540 More domain model usage 2022-07-03 16:34:58 -04:00
arkon
a3ab8746bf More domain model usage 2022-07-03 16:12:31 -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
b3dd8b7355 More domain model usage 2022-07-03 13:21:48 -04:00
Andreas
eb2a904b61
Remove SQLiteOpenHelper as database is migrated to SQLDelight (#7448) 2022-07-03 11:48:59 -04:00
Andreas
17951cfd68
Use SQLDelight for all Manga related queries (#7447) 2022-07-03 10:17:41 -04:00
Andreas
9e3b454b1b
Use SQLDelight for all MangaCategory related queries (#7441) 2022-07-02 19:05:38 -04:00
Andreas
29633b64aa
Use SQLDelight for all Chapter related queries (#7440) 2022-07-02 18:51:33 -04:00
arkon
76c0ead1db Migrate to more use of domain models 2022-07-02 17:14:19 -04:00
Andreas
2674570792
Use SQLDelight for a Category related queries (#7438) 2022-07-02 16:12:06 -04:00
arkon
21771e62aa More SQLDelight migrations 2022-07-02 15:19:52 -04:00
arkon
2dfbfd0958 Remove more unused StorIO code 2022-07-02 13:08:08 -04:00
Andreas
05085fe57f
Use SQLDelight on Library screen (#7432)
- Uses the new `asObservable` function to change the database calls to use SQLDelight, which should make the impact minimal when it comes to bugs.
- Use interactors where they already exist
- The todos are for the Compose rewrite
- Removed unused StorIO methods/queries
- Tested loading library, move manga to new category, unfavorite multiple manga, move multiple manga from one category to another, change filter, sort and display settings (with and without per category settings), (un)mark chapters, start/delete downloads

Thank Syer for asObservable

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

Co-authored-by: jobobby04 <17078382+jobobby04@users.noreply.github.com>
2022-07-02 12:55:34 -04:00
AntsyLich
ff32ab09fb
Downloader: Optimize split tall image (#7435) 2022-07-02 12:49:50 -04:00
AntsyLich
deaded5af2
Reimplement chapter download indicator longpress (#7412) 2022-07-02 12:43:18 -04:00
Andreas
1f10b79ee8
Use SQLDelight on Updates screen (#7423) 2022-06-30 22:18:12 -04:00
AntsyLich
e1525a5125
DownloadProvider: Only provide necessary info and not whole chapter/manga class (#7411) 2022-06-30 09:20:55 -04:00
arkon
7e4c45858f Bump dependencies 2022-06-29 22:45:22 -04:00
arkon
53decfd47b Migrate usages of SyncChaptersWithTrackServiceTwoWay 2022-06-26 21:34:54 -04:00
arkon
65264e3ef5 Migrate more track DB calls to SQLDelight 2022-06-26 19:46:41 -04:00
arkon
4ca0fc7a4d Fix app update install notification disappearing 2022-06-26 19:11:34 -04:00
Osyx
ad106bd884
Add new "Lavender" theme (#7343)
* Add new "Lavender" theme

* Add light theme values for Lavender theme

* Fix order of enums

* Fix accented UI elements in set categories sheet being different colors

Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
2022-06-26 10:01:31 -04:00
jobobby04
470a576441
Fix downloader crash related to UnmeteredSource (#7365)
Fix crash when starting a download with chaqpters from a UnmeteredSource
2022-06-25 11:09:41 -04:00
Ivan Iskandar
33a778873a
MangaController overhaul (#7244) 2022-06-25 11:03:48 -04:00
AntsyLich
e3b1053c03
Use sqldelight in migration (#7331)
* Use sqldelight in migration

* Some more changes

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

* Review Changes

* Review changes 2

* Review Changes 3

* Review Changes 4

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
2022-06-21 17:27:55 -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
arkon
9f66c85281 Migrate duplicate manga check to SQLDelight
Extracted from #7244

Co-authored-by: ivaniskandar <ivaniskandar@users.noreply.github.com>
2022-06-19 10:15:24 -04:00
arkon
dd983c803b Delete unused database queries/resolvers 2022-06-17 22:35:21 -04:00
Ivan Iskandar
1b804e61cb
Fix cover fetching in compose views (#7315)
Make sure it passed thru the custom fetcher
2022-06-17 22:21:29 -04:00
Andreas
c5d84b4f24
Fix History not being added when restoring backup (#7324) 2022-06-17 17:29:07 -04:00
Andreas
017f6b22f0
Use SQLDelight on Category screen (#7310)
* Use SQLDelight on Category screen

* Include category name in DuplicateNameException
2022-06-16 10:59:10 -04:00
nicki
fdf384b809
Add Cancel button to App Update Notification (#7309)
* Add cancel button in app update download notif

Since stuck downloads are a common issue and only solution until now was
to force close the app or download and update the app manually by
downloading from GitHub (which clears the notif away)

Based on commit
4dea924337

Co-authored-by: Jays2Kings <8617760+Jays2Kings@users.noreply.github.com>

* Linting by Android Studio

* commit PR Review Suggestion

Update app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt

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

* Use `launchIO`

copied this over from how j2k was doing it. Launching in IO Thread like
how it was before this PR is sufficient

* Clear previous actions before adding `Cancel`

Otherwise, it led to two identical Cancel buttons

Co-authored-by: Jays2Kings <8617760+Jays2Kings@users.noreply.github.com>
Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-06-15 18:07:01 -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
5bb78eb77f
Update manga metadata on library update with sqldelight (#7293)
Co-Authored-By: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
2022-06-12 10:21:45 -04:00
arkon
d098eca69d Remove unused database resolvers/queries 2022-06-11 11:51:14 -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
e15a867106 Convert clear database queries to SQLDelight 2022-06-10 21:33:56 -04:00
Ivan Iskandar
59837bbb90
Change cover memory key (#7276)
Use different key for custom cover and add last modified time for updating
cover without clearing the whole memory cache
2022-06-10 09:33:59 -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
cd0294b1b6 Replace history query with actual upsert 2022-05-29 12:12:06 -04:00
Andreas
b36ca92dd9
Make Storio follow new database table structure (#7217) 2022-05-28 18:36:40 -04:00
Andreas
c8468c29f1
MangaUpdates tweaks (#7205)
* MangaUpdates tweaks

* Review changes

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

* Use built in functions instead of Jsoup

Co-authored-by: arkon <4098258+arkon@users.noreply.github.com>
2022-05-28 18:36:28 -04:00
arkon
3c40010aff Minor cleanups 2022-05-28 09:12:15 -04:00
Chris
63238b388d
Fix global update ignoring network constraint (#7188)
* update library update network constraint logic

* add explicit 'only on unmetered network' update constraint
2022-05-28 09:09:53 -04:00
AntsyLich
809da49301
Reader: Save reading progress with SQLDelight (#7185)
* Use SQLDelight in reader to update history

* Move chapter progress to sqldelight

* Review Changes

Co-Authored-By: inorichi <len@kanade.eu>

* Review Changes 2

Co-authored-by: FourTOne5 <59261191+FourTOne5@users.noreply.github.com>
Co-authored-by: inorichi <len@kanade.eu>
2022-05-28 09:09:27 -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
arkon
9f42306f79 Minor cleanup 2022-05-15 17:03:57 -04:00
FourTOne5
71bb8ed975
Minor cleanup in ImageUtil and SourceFilterPresenter (#7106)
* Minor cleanup in `ImageUtil` and `SourceFilterPresenter`

* Fix missed stuff
2022-05-14 11:34:15 -04:00
S97
f75d632740
Fixed splitting logic and CBZ compression logic (#7098)
* Fixes:
- spliiting fails when the page was already been split and processed before
- Moved CBZ logic a little earlier to avoid marking a download as complete before the CBZ compression was completed

* Added a single space for readablity

* Added 2 spaces for readability

* Moved the splitting logic to happen inside getOrDownloadImage()

* Minor cleanup

* - Improved error handling when splitting fails due to OOM exception caused by BitmapFactory.decodeFile. - Changed logic from throwing error to only notify to allow the download to complete even if splitting failed.

* reverted auto formatting changes

* removed an extra loop

* Merged to Upstream, cleaned up

* Removed unused localized string

* Minor cleanup
2022-05-11 22:36:16 -04:00
arkon
ae7df4fb7f Update linter 2022-05-10 17:54:52 -04:00
arkon
d3f9232a3f Minor cleanup
- Add pending intent immutable flags to satisfy lint warnings
- Change AddDuplicateMangaDialog arg to a function instead to avoid leaking controller-specific logic into it
- Require WebView 99+
2022-05-10 17:39:45 -04:00
FourTOne5
9f655e0d41
Fix download splitter potentially throwing OOM on huge images (#7099)
* Fix download splitter potentially throwing OOM on huge images

Also move the splitting to ImageUtil

* Change variable name and logcat output
2022-05-10 17:06:18 -04:00
nicki
e7ed130f2a
Check for app updates by comparing semver (#7100)
Instead of just checking whether the current app version *matches* with
latest app version in GitHub Releases, compare the semver from the tag
names to check whether the latter is greater and the app needs an update

Reference: semver spec #11 https://semver.org/#spec-item-11

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
2022-05-10 17:04:40 -04:00