* Add missing @EncodeDefault annotation to MALOAuth
Similar to the situation with Bangumi, the missing annotation means
kotlinx.serialization would _provide_ the default value upon
instantiation but not serialise it to disk. This means the isExpired()
calculation would effectively rarely/never do its job correctly,
leading to Mihon sending expired tokens to MAL and causing problems
for everyone involved.
Overall, this change _could_ (should) lead to a drastic reduction in
MAL requests failing, leading to users having to relink their MAL
accounts.
Also switched createdAt to be in seconds instead of milliseconds as
all other trackers use seconds for timestamps (except for AniList,
which uses milliseconds but doesn't use a createdAt timestamp anyway).
* Add CHANGELOG.md entry
(cherry picked from commit 29ec7c125a3f1a1f39a90f8eba2d3e39b5af9797)
* Fix Bangumi tracking losing track of login state
kotlinx.serialization does NOT serialize default values (like
createdAt in BGMOAuth.kt), so every time the Bangumi tracker
deserialized the tracker OAuth, createdAt was set to the time of the
read, not the time of issuance.
Separately, BangumiInterceptor did correctly fetch new OAuth
credentials upon detected expiry of the stored credentials and saved
them, but did not use them for the current request (the new
credentials were used for all subsequent requests only). This led to
401 errors from Bangumi because the expired access_token was provided.
A subsequent request using the newly acquired access_token would end
up being successful.
* Add CHANGELOG.md entry
(cherry picked from commit dce6aacf02d07f3f123b19b1b74cbbe18c28852b)
* Add zoned date & time to debug info & logs
This should help distinguish log entries that happened recently and
may be related to crashes from older entries that occurred before now.
* Change logcat date and time output format
After some discussion, it was decided to adjust the logcat date and
time display to include the year and the timezone in the logcat
output. This results in a line start like this:
`2025-01-27 18:37:46.662 +0100`
which follows the following DateTimeFormatter pattern:
`yyyy-MM-dd HH:mm:ss.SSS Z`
* Add CHANGELOG.md entry
(cherry picked from commit 503d0be66772c37e08e69e5d022475245b706fd1)
* switch off integrated H to show E-H source & extension
* More languages for E-H/ExH, also more popular with rate 5
* Don't hide Multi source when toggle Integrated H
* Avoid crash trying to load ehentaiBrowseDisplayMode
* change source ID to matching general extension
* migration old source ID to new source ID
* Allow importing of EHentai extension backups
* limit library update & metadata source to only Multi lang
* update app version
* fix spotless
* also migrate saved search/feed & pinned EH/EXH source ID when restore from backup or update app
* add color to notification
* add app icon to extension update notification
* add app icon to download error notification
* add large app icon to all the notification
* set large image for chapter update & save image notification
* Fix: background color of download list when using custom theme
* Fix background color in Migration's source list
* Fix custom theme color in manga's Edit Info
* Fix custom theme color in manga's Migration Config
* Fix custom theme color in manga's Migration Config
* Fix custom theme color & relayout merge setting's dialog
* using CustomColorScheme for DownloadQueue
* using CustomColorScheme for metadata source
* feat: add global search shortcut to SmartSearch
* feat: add global search shortcut to SmartSearch
* feat: add back button to BrowseTabWrapper
(cherry picked from commit 46dea6d598a61b5b1df186be68122a9dd20285b1)
* add per Extension Incognito Mode
* migrate incognito sources when extension is updated
* remove incognito sources when extension is uninstalled
* remove not used variable
* address change requests
address change requests
* Rebase and cleanup code
---------
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit c283abefb03f79ce6652492db71cde410f828f78)
* BrowseTab: serialized data object must have readResolve
* simplify usage of bulk-selection select-all/reverse
* hide bulk-selection select-all/reverse
* fast browsing by avoid insert every entries into DB
* fix: exclude categories to delete chapter when mark as read
* Revert "Auxiliary commit to revert individual files from 3d3bbb7e4d56010af5bbec8a7c353da220d1f8d3"
This reverts commit d2db2fb1e3eb9b0b15958722a8d4e3cfd91efc2c.
* ignore category exclusion when manually delete downloaded chapters
* fix: properly ignore categories exclusion when manual delete
* also ignore bookmark chapter if manually delete single chapter
Also, when some entry failed to create download folder, it shows a notification saying only "invalid location: /downloads" which is misleading.
* more detail notification on invalid download location
* fix: download job stops all together even if 1 entry is failed to create directory
* fix nh images not loading
(cherry picked from commit 3278e2fe918de87056528eb4aeaf57be6d71d35a)
* fix thumbs on nh
(cherry picked from commit aa295377e78a0d5a658ec983f7a28b6345d86c09)
* default to media server 1 for old nh entries
(cherry picked from commit 2990a5e7ab98de5dc89c0affe7e265827d3244a3)
---------
Co-authored-by: az4521 <18432684+az4521@users.noreply.github.com>
* Maintain correct source order even when receiving new chapters from sync service
* Add comma required by build service
(cherry picked from commit a32c7186e43fe616c5956f04c0cef50b450d97c1)
* Barebones setup (only AniList works)
* Show tracker selection dialog when entry has more than one tracker
* MangaUpdates implementation
* Add logging and toast on error.
* MyAnimeList implementation
* Kitsu implementation
* Fix MAL authors and artists
* Decode AL description
* Throw NotImplementedError instead of returning null
* Use logcat from LogcatExtensions
* Replace strings with MR strings
* Missed a string
* Delete unused Author class.
* Add Bangumi & Shikimori support for info edit (#2)
This adds the necessary API calls and DTOs to allow for editing an
entry's data to the data from a tracker, specifically adding support
for Bangumi and Shikimori.
* Exclude enhanced trackers from tracker select dialog
* MdList implementation
* Remember getTracks and trackerManager
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
---------
Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
(cherry picked from commit fd120c5081a74393f0f2c174f2b3573b14c6d4e4)
* Include Coil's broken hardware bitmap device list
Declares all listed devices as unable to use hardware bitmaps.
Might fixmihonapp/mihon#1541.
* Hide Hardware Bitmap Threshold setting if unusable
This hides the setting from the UI if the user's device in on Coil's
list of devices with problematic hardware bitmap implementations.
Also moved HARDWARE_BITMAP_UNSUPPORTED into the ImageUtil as a
property for more ergonomic access across the project.
* Add missing negation
* Update CHANGELOG.md
* Update CHANGELOG.md
* Needs to be and not or
Also fix typo in CHANGELOG.md
---------
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit 7f2cfb5eb224896d6d0ffa6960f0a98c7325e240)
* migrating
* - Fix Broadcaster
- Include Updater for Debug
- json to emulate Github call
* - resetup AppUpdateJob when changing settings
- Fix ACTION_MY_PACKAGE_REPLACED
* improve notification
* update icon
* app update to high important
* - Run auto install on AppUpdateJob
- Add release link to job
* idle state & network aware
* fix duplicated job start
* don't show notification & start job for peek-into-preview
* allow cancel auto update job when set to NEVER
* always notify on install complete
* rearm AppUpdateJob each time MainActivity already checked for update
* MainActivity checks every 2 days, rearm AutoUpdateJob in 3 days
* - fix install error notification ID
- add timeout for manual installation if package manager crash
* settings & spotless
* restriction settings & auto run download-install if not in restrictions
* clean up
In short:
- fetch & show actual summary
- fallback to "name" if "name_cn" is empty
- request larger responseGroup to get & display the summary & rating
- add type filter query param to make Bangumi filter, not us
Previously, we only displayed the "name" in the summary area and used
"name_cn" as the entry name. However, "name_cn" (Chinese name) can be
an empty string at times, resulting in an awkward looking search
result list where some, many, or even all the results have no title
displayed and only show the "name" (Japanese name) in the summary
area. This has been solved by using "name" as a fallback value should
"name_cn" be empty.
If a Chinese name is available, the original name is prepended to the
summary with the addition "作品原名:" (meaning "original series title").
By using the "responseGroup=large" query parameter, we can request
the required data we need to display the actual summary for an entry
and the entry's average rating.
The "name" is prepended to the summary contents, if any exist, so it
is still accessible for series identification if a "name_cn" exists
too and was used for the result title.
Adding the "type=1" filter query parameter means Bangumi will only
return entries of type 1 ("book") instead of all types and Mihon
needing to filter, resulting in potentially missed entry matches.
(cherry picked from commit 78f9a84b14e0ece988f80d61011f63c0f7e92a67)
Somehow this specific issue keeps getting flagged by unrelated PRs'
CI runs (but only sometimes? Somehow? Other times the CI run would
succeed with no spotless issues.)
---------
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit ed9e13a365ba1b55cec21c26b93b1c62d29485c8)
- Select a range of entries for migration
- Better bottom bar
- Show obsolete sources
---------
Co-authored-by: ImaginaryDesignation <108343184+ImaginaryDesignation@users.noreply.github.com>
- A dedicated screen in Settings for error list when updating library
- Allow to jump to Error screen if click on notification
- Allow to migrate error entry
- Create error on each entry updated instead of waiting for the whole updating list to finished
- Overwrite entry's error if new error happens after updating
- Clear entry's error if it successfully updated
- Clear un-relevant errors (entry which was removed from Library) on next update
- List of errors can jump to top/bottom or next/previous errors group
- Won't create error file anymore
* Added library update errors screen
(cherry picked from commit 7cf37d52f959ac65f53cf7657563fb4428bd9188)
* Open library update errors screen on clicking library update error notification
(cherry picked from commit d2d22f437a1d61b086f1e19dfbcd2c0a2bc125f4)
* LibraryUpdateErrorScreen's bottom UI with scroll to top/bottom buttons
(cherry picked from commit 859ce54474d456232510e21f4f6795af65489be2)
* migrate to AppBar
* sticky header
* scroll to next/previous group of errors
* insert error entry one by one
* delete error from DB when successfully updated
* clean un-relevant errors from DB on every updates
* fix errors & clean up
* catch exception & fix notification intent
---------
Co-authored-by: ImaginaryDesignation <108343184+ImaginaryDesignation@users.noreply.github.com>
Also for Vertical mode:
- Fix page's text color
- Fix steps visual (tachiyomiorg/tachiyomi#9461)
- Dispatch page change only when needed
(cherry picked from commit df9fff60da3a38acd8fcd540b5fdd275be93f2d5)
* Hide sync library option when sync is disabled
- Add isSyncEnabled parameter to LibraryToolbar and LibraryRegularToolbar
- Pass isSyncEnabled from LibraryTab to LibraryToolbar
- Conditionally display sync library action based on isSyncEnabled
- Update LibraryContent to include isSyncEnabled parameter
- Adjust LibraryTab to handle sync-related functionality
- Remove direct dependency on SyncPreferences in LibraryToolbar
* Update LibraryScreenModel to react to sync service changes
- Replace static isSyncEnabled update with dynamic observation
- Use syncPreferences.syncService().changes() to update isSyncEnabled state
- Ensure isSyncEnabled is updated whenever the sync service changes
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
* Fix sync service state update in LibraryScreenModel
- Resolve ambiguity in lambda parameters
- Correctly update isSyncEnabled state based on syncService value
* Optimize sync service state updates in LibraryScreenModel
- Add distinctUntilChanged() to filter out consecutive duplicate emissions
- Simplify mutableState.update lambda for better readability
- Remove redundant boolean comparison in isSyncEnabled assignment
---------
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
(cherry picked from commit 697b0de22691eca7078a42f1abbc0636efd9f0e8)
* Show download state and progress on reader chapter list.
* Update download indicator on progress and status change.
(cherry picked from commit 558ce084c81ca8e82b540b62890ac3eb4e65aa18)
* support panorama cover
* bigger panorama cover size in GlobalSearchCardRow
* setting to enable/disable
* panorama cover for History items
* Keep panorama cover position in Library View centered for better visual
* fix: update ratio in Detail page if cover doesn't reload anew
* adjust ratio to switch to panorma
* panorama cover for Migration items
* center panorama cover & add dominant background color
* panorama cover for EditMangaInfo
* Fix size on GlobalSearchCardRow
* display mode for manual panorama cover
* Fix LibraryFlagsTest
* material3: update scaffold to support FabPosition.Start
also fix fab's width calculation with inset
* Moveable Read button & sticky to either size of screen
* update string
* migrate to use DynamicMaterialTheme instead
* support various style for custom theme
* use BaseColorScheme with dynamicColorScheme instead, to avoid Activity being recreated
* apply theme right when changing theme style
* change default style to Fidelity
* adaptable to system contrast with Custom theme & Theme based cover
This time, the Kitsu API docs are silent on whether this field (or
any other field) can be null/undefined/etc, but it can happen and
caused an error during search and update. This change just ensures the
attribute is nullable and is set to an empty String when it is null.
(cherry picked from commit f5c6d2e1a6896c031b8f4583375ee868f252822a)
* support hide categories (merged from Aniyomi)
* styling CategoryScreen: always showing all categories & shading the hidden one
* Hide categories directly on Library tab and load it as a flow
* fix: hidden categories got reset after delete/reorder
* remove unnecessary code
* Add crashlytics to standard builds
(cherry picked from commit 3c611b95fb79e5ac972019b76c7b24f46a3087fd)
* Testing crashlytics
* working
* cleanup
* Revert "Auxiliary commit to revert individual files from 84232c7fe229bf557680a787fa02c055ca18dc66"
This reverts commit 2c9b6277b276f108a25e90e6be9a227440136063.
* Revert "Auxiliary commit to revert individual files from cf3f5fe1586f40fabf5b75a649ab332282608a08"
This reverts commit 708f6b1d3803374b0440d163560a682f0cfc618e.
* Only send crashlytics on Standard & Release/Preview build
---------
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
The API docs and the responses type `ratingTwenty` as a "number" (Int
in Kotlin, it's divided by 2 for a .5 step scale 0-10). It's nullable
because an entry without a user rating returns `null` in that field.
(cherry picked from commit 001249a89dd4824a3df5661733062662c0ab44bd)
* Track when marked as read
* Add dismiss to snack bar
* i18n & ignore decimal chapters
* Detekt would have caught that 🤣
* `Ok` > `Yes`
* Dont prompt if untracked or current > new
* Move to MangaScreenModel
* Suggestions
Co-Authored-By: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
* Review 2
* toggleAllSelections first
---------
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit abfb72c89c008973db866bf4b696b699db155574)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt
* 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
(cherry picked from commit 9f99f038f341e325c4f56372a5ce950cf9f7cd6d)
* Show local chapters as downloaded on merged entries.
* Disable downloadIndicator for local chapters on merged entries.
(cherry picked from commit 2cb8f8f872f055275bf6126f1ed4ef2617c69ea8)