Commit Graph

1390 Commits

Author SHA1 Message Date
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
nicki
11c01235ac
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
2022-05-09 11:03:40 -04:00
arkon
85ef40d0ff Don't allow swiping away app update install notification
Also show the new version number in the notifications.
2022-05-07 11:04:55 -04:00
arkon
39c0b74250 Fix tall image split math issues
- Round up per-split height to ensure the entire page ends up being split
- Handle the last split of a page potentially being shorter than the others
2022-05-06 23:10:56 -04:00
arkon
a9e629aea6 Minor cleanup
- Remove some unused StorIO queries
- Clean up tall image splitting a bit (no need for creating an unscaled scaled bitmap copy, or tracking coordinates)
- Clean up library updater a bit (still needs a lot of work though)
2022-05-06 22:48:00 -04:00
S97
aa11902aa1
Add option to automatically split tall downloaded images (#7029)
* Auto split long images to improve performance of reader

* Auto split long images to improve performance of reader - fixed the sorting

* Improved performance of splitting by getting rid of 1 extra loop

* Cleaned up code and moved the functionality to work during the downloading process (unsure how this affects download speed)

* Replaced the import .* with the actual used imports

* Fixes for Bugs discovered during my testing

* Fixed last split missing bug.

* Reordered the download progress to be updated before splitting instead of after to reflect more meaningful progress of download

* Reverted last commit since it had no effect

* Improved progress tracking when a download is paused then resumed.

* Implemented the recommended changes to enhance the feature.

* Apply suggestions from code review

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

* Update app/src/main/res/values/strings.xml

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

Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-05-06 22:17:27 -04:00
FourTOne5
c4088bad12
Fix removing manga from library reverts during global update (#7063)
* Fix removing manga from library reverts during global update

* Review Changes

* Review changes 2
2022-05-06 22:15:44 -04:00
arkon
e3f6cfa2df Add newer methods to StubSource 2022-05-01 10:46:44 -04:00
saud-97
5763201307
Notify user of error during a page download failure (#7047)
* Notify user of error during a page download failure

* Included the manga title in the error notification
2022-04-30 16:30:02 -04:00
arkon
dee7830793 Update navigation bar padding in Compose screens 2022-04-30 11:59:39 -04:00
Andreas
891406cc7f
Fix database corruption (#7042)
When using SQLDelight and Storio at the same time
2022-04-29 08:04:59 -04:00
arkon
70698e6494 Add links to website FAQ for library update and download warning notifications 2022-04-27 22:45:31 -04:00
Andreas
7261fcccda
Use Compose in Migrate tab (#7008)
* Use Compose in Migrate tab

* Add missing header

* Remove unused files

* Fix build after rebase

* Changes from review comments
2022-04-27 08:36:16 -04:00
arkon
0b77b78f6a Remove some minor settings
Some spring cleaning to remove some unnecessary complexity so things are easier to maintain.

- Start screen: redundant with app shortcuts in Android 7.1+
- Jump to chapters: irrelevant in tablet mode and people can scroll a tiny bit if they really have to
- Option to not scroll away bottom nav: issues with fast scroll will be irrelevant with it being replaced or removed in the Compose migrations

Get ready for people malding over their special needs. https://xkcd.com/1172/
2022-04-24 22:17:15 -04:00
FourTOne5
06bec0ad54
Download new chapters when only excluded categories is selected (#6984) 2022-04-24 16:36:14 -04:00
arkon
2caf220b18 Remove some unused StorIO queries/resolvers 2022-04-24 16:20:46 -04:00
arkon
91ed3a4a5f Fix skipped library entries and size warning notifications using same ID 2022-04-24 15:49:24 -04:00
arkon
20145f7a12 Fix update warning notifications being cut off (fixes #6983) 2022-04-24 15:35:05 -04:00
arkon
883945e3e8 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.
2022-04-24 15:32:50 -04:00
arkon
3feea71146 Add battery not low restriction for global updates (closes #6980) 2022-04-24 15:25:28 -04:00
arkon
08e63e5fab Minor cleanup 2: Electric Boogaloo
- Reword pins on top setting
- Make "Latest" button style match old UI
- Sort sources by name
2022-04-24 15:17:01 -04:00
Andreas
29a0989f28
Convert Source tab to use Compose (#6987)
* Use Compose in Source tab

* Replace hashCode with key function

* Add ability to turn off pins moving on top of source list

* Changes from review comments
2022-04-24 14:35:59 -04:00
arkon
2b79295240 Revert "Revert history Compose/SQLDelight changes"
This reverts commit 96c894ce5b.
2022-04-22 17:35:18 -04:00
arkon
96c894ce5b Revert history Compose/SQLDelight changes 2022-04-22 17:27:58 -04:00
Andreas
9d77052d9c
Enable verbose logging in dev flavor by default (#6979) 2022-04-22 12:34:53 -04:00
arkon
bc2ed763bd Default auto backups to 2 2022-04-21 17:13:33 -04:00
Andreas
b1f46ed830
Migrate History screen database calls to SQLDelight (#6933)
* Migrate History screen database call to SQLDelight

- Move all migrations to SQLDelight
- Move all tables to SQLDelight

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

* Changes from review comments

* Add adapters to database

* Remove logging of database version in App

* Change query name for paging source queries

* Update migrations

* Make SQLite Callback handle migration

- To ensure it updates the database

* Use SQLDelight Schema version for Callback database version

Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com>
2022-04-21 15:45:56 -04:00
arkon
189f92d7e8 Show better error message when empty backup creation is attempted (closes #6941) 2022-04-17 11:51:24 -04:00
Andreas
c475acd1ea
Migrate History screen to Compose (#6922)
* Migrate History screen to Compose

- Migrate screen
- Strip logic from presenter into use cases and repository
- Setup for other screen being able to migrate to Compose with Theme

* Changes from review comments
2022-04-17 10:36:22 -04:00
arkon
9c30fa1da3 Update F-Droid migration guide link 2022-04-15 12:11:01 -04:00
arkon
e81bd61e24 Adjust update/download warnings
This is a partial revert/evolution of 538dd60580

- Back to notifications, because Android 12+ may cut off toasts
- Notifications now automatically dismiss after 30s on Android 8+ (taken from J2K)
- Also warn if more than 30 chapters are queued for download
2022-04-15 10:24:54 -04:00
arkon
5da2c82f47 Avoid crashing if picture can't be saved (related to #6905) 2022-04-13 18:45:49 -04:00
arkon
821d9cdb02 Show different update notification for F-Droid installations 2022-04-13 17:44:43 -04:00
arkon
28575936d3 Move learn more text in skipped entries notification to main content
Because people apparently don't realize they can tap actions
2022-04-12 23:08:00 -04:00
arkon
eb33d3c991 Remove build flavor checks for update warnings
"stable" was invalid anyway, it should've been "release"
2022-04-11 23:05:00 -04:00
arkon
4ecde9fc39 Gate update/download warnings to non-stable flavors 2022-04-10 12:17:45 -04:00
arkon
5afff31f72 Formatting 2022-04-08 16:44:23 -04:00
arkon
346652e508 Ensure media store scan is triggered after saving an image (fixes #6808) 2022-04-08 15:55:12 -04:00
arkon
f0eb42e72d Update linter 2022-04-08 15:30:39 -04:00
Ivan Iskandar
ac980a4dbf
MangaCoverFetcher: Handle moving cover cache after adding to library (#6885)
Move cover cache to separate cache dir after the parent manga is added to library
2022-04-08 12:10:06 -04:00
Andreas
3026ff241b
Write library cover to library cover cache (#6883) 2022-04-07 22:00:17 -04:00
Ivan Iskandar
2466a079d5
MangaCoverFetcher: Don't close network response (#6882) 2022-04-07 13:34:31 -04:00
Ivan Iskandar
5409af0a6c
MangaCoverFetcher: Use source's header for network request (#6847) 2022-04-02 08:44:01 -04:00
Andreas
cd07027192
Use the file extension from the ImageType enum (#6800)
* Use the file extension from the ImageType enum

* Use the mime type from the ImageType enum

- On Android 29+
2022-03-21 13:13:39 -04:00
Andreas
1163aa4e4e
Share logic for saving page/cover (#6787)
* Use MediaStore on newer Android Q or newer

* Use flow instead of Observable

* Review comment fixes

* Use suspended function instead of flow
2022-03-19 16:46:23 -04:00
quangkieu
9547311d7d Avoid throw as it is slow expensive operations 2022-03-12 16:47:31 -05:00
arkon
56042ad0b6 Split out global library update skipped entries into separate notification (closes #6722) 2022-03-09 18:04:52 -05:00
arkon
45da036789 Avoid potentially deleting the entire backups folder 2022-03-09 18:04:52 -05:00
Andreas
86016de6cb
Recreate Backup worker with IS_AUTO_BACKUP_KEY flag (#6742)
* Recreate Backup worker with IS_AUTO_BACKUP_KEY flag

* Extra safety net to not delete backup folder
2022-03-06 08:36:47 -05:00
arkon
d06984e3a3 Use same name for manual backup job tag and work name 2022-03-05 09:49:21 -05:00
Ivan Iskandar
10eef282fa
Coil 2.x upgrade (#6725)
* Migrate to Coil 2

* Adapt to use coil disk cache

* Update to alpha 7

* Update to alpha 8

* Update to rc01
2022-03-04 16:04:32 -05:00
Ivan Iskandar
d53bb4c337
Use existing worker for manual backup creation (#6718)
* Use existing worker for manual backup creation

This will show the "creating backup" notification when auto backup is
running. Complete or error notification will continue to be shown only on
manual job.

* Make sure disabling auto backup don't cancel running manual backup job
2022-03-03 22:15:49 -05:00
啊o额iu鱼
6f5328f663
Fix corrupted backup file, fix #6424 (#6691)
Reappear stably on the api30 Android Studio Emulator,
first save a large backup file,
then save a small backup file, overwriting the previous larger backup file,
so you get a backup file with a larger size but only the first part is meaningful,
2022-02-23 09:12:24 -05:00
arkon
4a3e4a7c5c Reword library update restrictions setting and surface skipped entries in error notification/log 2022-02-14 18:16:22 -05:00
FourTOne5
f18d161eaf
Add "Started" library filter and library update restriction (#6382)
* Add chapter read count to library manga

Co-Authored-By: Jays2Kings <jays@outlook.com>

* Add "Started" library filter and library update restriction

* Update Filter when its changed

* Add back accidentally removed stuff.

* Update..

* Change variable names

* Change Variable name where I missed

Co-authored-by: Jays2Kings <jays@outlook.com>
2022-02-13 10:42:28 -05:00
Gauthier
d8719ceee9
Navigate to pan / landscape zoom (#6481)
* pan if the image is zoomed instead of navigating away
quickly display full landscape image before zooming to fit height in fit to screen

* add Tap to pan preference, defaults to true
add landscape zoom preference, defaults to false

* hide landscape image zoom option if scale is not fit screen

* fix landscape image zoom for first image and loading image

* properly reload pagerholders when landscape zoom option is changed

* enable landscape zoom by default
2022-02-12 11:21:54 -05:00
Felix Kaiser
71ddb16574 Detect identical mangas when adding to library (#6579)
* added duplicate manga check

When adding a manga to your library, the app will go through each manga previously added and compare their names. If a match is detected, it will prompt the user and ask for confirmation. On this prompt there is also an option to view the other manga.

* added german translations for newly added strings

* Revert "added german translations for newly added strings"

This reverts commit 71ada62067.

* changed `AlertDialog.Builder` to `MaterialAlertDialogBuilder`

* using SQL query instead of filtering entire library with Kotlin
2022-02-12 11:13:27 -05:00
arkon
8c1662cfdb Disallow PackageInstaller extension installer option on MIUI 2022-02-05 23:02:13 -05:00
arkon
299e52e877 Allow disabling secure screen when incognito mode is on 2022-02-05 18:51:08 -05:00
arkon
45e4092335 Increase minimum required disk space to download chapters to 200MB (closes #6576) 2022-02-05 17:35:54 -05:00
arkon
19fe689969 Revert "Temporarily revert some things for stable release"
This reverts commit b88f8ae9d2.
2022-02-01 12:32:27 -05:00
arkon
b88f8ae9d2 Temporarily revert some things for stable release 2022-02-01 12:31:47 -05:00
arkon
75a2110626 Update preference dependencies 2022-01-31 18:13:57 -05:00
arkon
59cba2533c Revert "Disable update/download warnings for stable release"
This reverts commit 3da8677e32.
2022-01-31 16:03:42 -05:00
arkon
3da8677e32 Disable update/download warnings for stable release 2022-01-31 15:28:14 -05:00
Riztard Lanthorn
dea585e69b
add extra space before error in log description (#6505)
to make it easier to read if the log reader using word wrap
2022-01-26 23:29:38 -05:00
arkon
b459234ddc Try to show more relevant exception messages when failing to restore a backup 2022-01-26 22:43:27 -05:00
arkon
76d2c676fd Discard backup file if it fails to be created properly (e.g. fails validation) 2022-01-26 22:32:06 -05:00
arkon
d5015d37e1 Show error toast if empty URI is passed when trying to create/restore a backup 2022-01-26 22:31:28 -05:00
arkon
1b71e4cee7 Write job failure exceptions to error log 2022-01-26 22:21:01 -05:00
arkon
89dbb4d300 Avoid migration failing if previous source doesn't exist 2022-01-23 17:21:23 -05:00
arkon
e3f3686b8a Allow Samsung devices on Android 12+ to use dynamic theme
Since it seems to work fine, regardless of what the Material Components library seems to dictate.
2022-01-22 14:53:12 -05:00
Gauthier
cd7cf3583e
fix: handle Komga tracks during manga migration (#6463)
* fix: handle Komga tracks during manga migration

closes #6354

* refactor: remove Komga direct reference
2022-01-22 14:25:05 -05:00
arkon
4a27f0546c Fix bottom nav being visible when resuming app (fixes #6012) 2022-01-09 10:26:51 -05:00
arkon
3dc4fd8dd1 Make tracker status wording/ordering more consistent 2022-01-08 15:49:39 -05:00
arkon
d04d676d2f URL encode Kitsu search queries (fixes #5712) 2022-01-05 17:43:11 -05:00
arkon
dbb2c523c1 Avoid crashes in tracker interceptor errors 2022-01-02 17:56:49 -05:00
arkon
0b9d436753 Fix some crashes 2022-01-02 11:25:35 -05:00
arkon
c4a476d0d2 Handle renaming existing downloaded CBZ chapters on update 2022-01-01 15:22:03 -05:00
Seishirou101
5336c5b46e Add compress to CBZ on download (#6360) 2022-01-01 14:46:43 -05:00
Mohit Mandalia
22615f5981
Fixes descriptive notification message for errors (#6413)
* Fixes descriptive notification message for errors
Fixes #6401

* Fixes descriptive notification message for errors
Fixes #6401
2022-01-01 13:13:44 -05:00
arkon
78c2631b6f Move preference extension functions to utils 2021-12-31 16:32:24 -05:00
arkon
7c246ffc71 Add link to troubleshooting guide in library update error log file 2021-12-31 15:16:44 -05:00
arkon
f3718257f5 Reduce redundancy in some preference declarations
The remaining ones could also be converted to FlowPreferences for this, but it's not really necessary.
2021-12-26 12:44:38 -05:00
arkon
58c2f22120 Truncate MAL search queries to first 64 characters (closes #6314)
Is it worth telling the user? ¯\_(ツ)_/¯
2021-12-26 11:35:28 -05:00
arkon
448645d83a Don't recompute constant device info 2021-12-24 10:25:02 -05:00
arkon
7edf7a434f Avoid crash on Samsung devices on Android 12
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
2021-12-24 09:42:45 -05:00
FourTOne5
a09d6c0470
Better Upload Date to not have a single blank upload date. (#6358) 2021-12-18 14:47:07 -05:00
arkon
532a1b1aba Address some IDE warnings 2021-12-17 12:30:41 -05:00
arkon
65062b4bcb Remove library update order setting
This doesn't make sense to have if the intention is to have reasonably sized global updates. Opting to remove it to remove complexity instead.
2021-12-17 12:29:54 -05:00
arkon
818fe50f77 Combine global update item restrictions 2021-12-17 09:57:37 -05:00
Riztard Lanthorn
6fddad7a77
Add option for library update only update completely read manga (#6323)
* Add option for library update only update completely read manga

only check manga for updates if there is no unread chapter

* sum
2021-12-17 09:40:54 -05:00
arkon
7f998ecdbd Revert download notification icon changes 2021-12-12 11:14:47 -05:00
arkon
13afa9f476 Show version name in new update notification 2021-12-11 13:09:16 -05:00
arkon
ed4dea8686 Update notification icons
Although no recent version of Android even shows these....
2021-12-11 12:59:05 -05:00
KieuQ
808177f8c9
Add download action to New Chapters Notification (#6336) 2021-12-11 12:51:30 -05:00
jmir1
a9d2741e6a
Automatically set tracker as completed after reading the last chapter (#6289)
* Automatically set tracker as completed after reading the last chapter.

* use integer value in comparison

* also set `started_reading` date

* don't use source manga's status

* remove useless line
2021-12-04 09:59:39 -05:00
arkon
e8f284d377 Add convenience extension functions for rate limit interceptors
To be included in extension-lib 1.3 as a replacement for the lib that's currently compiled in tachiyomi-extensions.
2021-11-28 14:41:46 -05:00
arkon
3ea3b0bf2e Add UnmeteredSource interface
To be included in extension-lib 1.3 (or whatever it's going to be). This applies to sources like Komga or Lanragi, where large numbers of update/download aren't of concern since they're (usually) self-hosted.
2021-11-28 14:41:03 -05:00
Henrik
8acce011b5
fix MAL search novel filter (#6279) 2021-11-25 12:55:52 -05:00
Hunter Nickel
9fe1a7e2ae
Add feature to clear database manga by source (#6241)
* Implement feature to selectively clear manga from database based on it's source

* Code cleanup and refactoring
2021-11-19 11:24:46 -05:00