Free and open source manga reader for Android
Find a file
MajorTanya 9f99f038f3
Use DTOs to parse tracking API responses (#1103)
* Migrate tracking APIs to DTOs

Changes the handling of tracker API responses to be parsed to DTOs
instead of doing so "manually" by use of `jsonPrimitive`s and/or
`Json.decodeFromString` invocations.

This greatly simplifies the API response handling.

Renamed constants to SCREAMING_SNAKE_CASE.

Largely tried to name the DTOs in a uniform pattern, with the
tracker's (short) name at the beginning of file and data class names
(ALOAuth instead of OAuth, etc).

With these changes, no area of the code base should be using
`jsonPrimitive` and/or `Json.decodeFromString` anymore.

* Fix wrong types in KitsuAlgoliaSearchItem

This API returns start and end dates as Long and the score as Double.

Kitsu's docs claim they're strings (and they are, when requesting
manga details from Kitsu directly) but the Algolia search results
return Longs and Double, respectively.

* Apply review changes

- Renamed `BangumiX` classes to `BGMX` classes.
- Renamed `toXStatus` and `toXScore` to `toApiStatus` and `toApiScore`

* Handle migration from detekt to spotless

Removed Suppressions added for detekt.

Specifically removed:
- `SwallowedException` where an exception ends as a default value
- `MagicNumber`
- `CyclomaticComplexMethod`
- `TooGenericExceptionThrown`

Also ran spotlessApply which changed SMAddMangaResponse

* Fix Kitsu failing to add series

The `included` attribute seems to only appear when the user already
has the entry in their Kitsu list.

Since both `data` and `included` are required for `firstToTrack`, a
guard clause has been added before all its calls.

* Fix empty Bangumi error when entry doesn't exist

Previously, the non-null assertion (!!) would cause a
NullPointerException and a Toast with
"Bangumi error: " (no message) when the user had removed their list
entry from Bangumi through other means like the website.

Now it will show "Bangumi error: Could not find manga".

This is analogous to the error shown by Kitsu under these
circumstances.

* Fix Shikimori ignoring missing remote entry

The user would see no indication that Shikimori could not properly
refresh the track from the remote. This change causes the error Toast
notification to pop up with the following message
"Shikimori error: Could not find manga".

This is analogous to Kitsu and Bangumi.

* Remove usage of let where not needed

These particular occurrences weren't needed because properties are
directly accessible to further act upon. This neatly simplifies these
clauses.

* Remove missed let
2024-09-03 01:46:08 +06:00
.github chore(deps): update gradle/actions action to v4.0.1 (#1165) 2024-08-27 18:02:08 +06:00
.idea Update project icon 2024-05-08 23:06:35 +06:00
app Use DTOs to parse tracking API responses (#1103) 2024-09-03 01:46:08 +06:00
buildSrc Use feature flags in compose compiler plugin 2024-08-30 13:55:11 +06:00
core/common Address spotless lint errors (#1138) 2024-08-19 18:11:39 +06:00
core-metadata Address spotless lint errors (#1138) 2024-08-19 18:11:39 +06:00
data Address spotless lint errors (#1138) 2024-08-19 18:11:39 +06:00
domain Add stable marker to Manga data class 2024-09-02 21:54:53 +06:00
gradle Add stable marker to Manga data class 2024-09-02 21:54:53 +06:00
i18n Add confirmation when adding repo via URI (#1158) 2024-08-25 22:07:14 +06:00
macrobenchmark Rework buildSrc and remove usage of subprojects 2024-04-06 12:18:10 +06:00
presentation-core Address spotless lint errors (#1138) 2024-08-19 18:11:39 +06:00
presentation-widget Address spotless lint errors (#1138) 2024-08-19 18:11:39 +06:00
source-api Address spotless lint errors (#1138) 2024-08-19 18:11:39 +06:00
source-local Address spotless lint errors (#1138) 2024-08-19 18:11:39 +06:00
.editorconfig Restrict line length with ktlint 2023-11-04 23:28:41 -04:00
.gitattributes Mark JAR as binary too 2020-01-11 16:13:08 -05:00
.gitignore chore(deps): update kotlin and compose compiler to v2 (major) (#819) 2024-06-07 03:48:35 +06:00
build.gradle.kts Fix R8 version configuration not working (#916) 2024-06-17 04:53:02 +06:00
CHANGELOG.md Respect privacy settings in extension update notification (#1156) 2024-08-25 19:47:25 +06:00
CODE_OF_CONDUCT.md Replace several reference of Tachiyomi to Mihon 2024-01-15 23:53:13 +06:00
CONTRIBUTING.md Remove detekt (#1130) 2024-08-19 12:51:37 +06:00
gradle.properties Disable mpp and agp compability warning 2024-04-06 08:39:32 +06:00
gradlew chore(deps): update dependency gradle to v8.8 (#856) 2024-06-02 01:23:39 +06:00
gradlew.bat chore(deps): update dependency gradle to v8.7 (#567) 2024-03-22 23:05:13 +06:00
LICENSE Remove License Appendix That Should Have Been Removed Initially (#4158) 2020-12-19 18:41:02 -05:00
README.md Change Kitsu to kitsu.app domain (#1106) 2024-08-11 22:40:28 +06:00
settings.gradle.kts Remove obsolete workaround (#1021) 2024-07-24 19:09:29 +06:00

Mihon logo

Mihon App

Discover and read manga, webtoons, comics, and more easier than ever on your Android device.

Discord server GitHub downloads

CI License: Apache-2.0 Translation status

Download

Mihon Stable Mihon Beta

Requires Android 8.0 or higher.

Features

  • Local reading of content.
  • A configurable reader with multiple viewers, reading directions and other settings.
  • Tracker support: MyAnimeList, AniList, Kitsu, MangaUpdates, Shikimori, and Bangumi support.
  • Categories to organize your library.
  • Light and dark themes.
  • Schedule updating your library for new chapters.
  • Create backups locally to read offline or to your desired cloud service.
  • Plus much more...

Contributing

Code of conduct · Contributing guide

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Before reporting a new issue, take a look at the FAQ, the changelog and the already opened issues; if you got any questions, join our Discord server.

Repositories

mihonapp/website - GitHub mihonapp/bitmap.kt - GitHub

Credits

Thank you to all the people who have contributed!

Mihon app contributors

Disclaimer

The developer(s) of this application does not have any affiliation with the content providers available, and this application hosts zero content.

License

Copyright © 2015 Javier Tomás
Copyright © 2024 The Mihon Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.