Commit Graph

6364 Commits

Author SHA1 Message Date
MajorTanya 1e054ea14d Fix inverted MAL OAuth expiry check logic (#3927) 2026-09-10 16:28:53 +00:00
Darkphoenix 35bb84705e Fix GPU texture leak when a decoded page is no longer usable (#3872) 2026-09-09 22:22:36 +00:00
MajorTanya aebf11a749 Make tracker utils package-internal (#3908)
It gets really annoying to use any of them when they have name
collisions. Especially extensions on Track or basic public functions.

Also make some same-file extension function in the MangaUpdates
package method on the class they extended.

I would have done the same for the DTOs themselves but any that are
used on method signatures have to be public and then all their members
also have to be public. We'd end up with a confusing mess of some
internal and some public DTOs, even at the top level (since generics
can be internal to the `dto` package (e.g. with parseAs<...>) but
return annotations cannot be).
2026-09-08 11:26:21 +06:00
Secozzi 5b69dbad81 Fix default category and manga sometimes not having their category restored (#3891) 2026-09-06 21:32:38 +06:00
Secozzi a82baac3ef Fixed crash caused by incorrect handling of kitsu score type from login (#3887)
* track/kitsu: Fixed crash caused by incorrect handling of score type from login

* revert changelog

* turn into lowercase when accessing map
2026-09-06 21:30:38 +06:00
MajorTanya 5e99306e5f Minor tracking refactors (#3900)
* Make tracker Api classes take their tracker's ID

Also made the name consistently `trackerId` since `trackId` can be
confusing in the context of Tracks that also carry several IDs.

Also made the public constants in TrackerManager entirely redundant,
so trackers are all equally getting their ID defined in their
constructor call now.

* Explicitly mark unused Exceptions as such

* Make isExpired method of BGMOAuth data class

As opposed to an extension defined in the same file

* Kavita: thumbnail_url -> thumbnailUrl

With a SerialName annotation of course

* Suwayomi: Remove redundant with(json)

Both of these requests don't use parseAs so this not required.

* Bangumi: Don't recreate OAuth object for storing

* Remove unused attribute from tracker OAuth classes

Mostly `token_type`.
Also removed `user_id` from BGMOAuth and `scope` & `expiresIn` from
MangaBakaOAuth (which already provides `expiresAt`).

* Use kotlin.time durations for token expiry math

Something like `Clock.System.now().plus(1.hours)` is much easier to
read than `System.getEpochMillis() + 3600`.

Also lets us use the `epochSeconds` attribute where the given
timestamps are seconds-resolution.

* Bangumi: Remove redundant apply block

* Kavita: Misc simplifications

* Use parseAs in tracker interceptors

* MAL: Use existing setAuth to store refresh token
2026-09-06 21:26:33 +06:00
w f3125ab897 Bump webgpuviewer (#3886)
* Add continuous min width

* Add dual page flip transition, separate some dual config

* Fix progress on sides for dual

* re-organize and minor fixes

* Reverse pan when vertical and zoom start right

* add flip to single

* Simple page size heuristics for dual selection

* zoom minimum wideness

* Fix continuous page progress

* continuous dynamic cache size

* Update libs.versions.toml
2026-09-04 21:18:18 +06:00
MajorTanya 21af65b100 Fix unhelpful generic 401 error on AniList expiry (#3888)
A leftover of what I assume was the v1 API behaviour handling manually
multiplied the `expires` values by 1,000, supposedly to make it a
millisecond value. However, AL tokens have been saved as milliseconds
since at least the v2 API implementation in 2018, so this has made
every expiry comparison ludicrously impossible.

Example:
millisecond timestamp:
1788529931115 (2026-09-04T13:52:11.115Z)
*1,000
1788529931115000 (+58646-04-04T21:45:15Z)

So any expiry comparisons would say "yes this token is still totally
valid", causing Mihon to send expired credentials and AL to respond
with a 401.

With these changes (which include some loosely associated clean-up),
we now correctly identify expired credentials before we attempt any AL
requests & actually show a toast with the "Token expired." error
message for the first time in 8 years or so?

I was able to keep the new ALOAuth shape compatible with
already-serialized data, though whenever a user (re-)links AL from now
on, both the `token_type` and `expiresIn` fields won't exist any more.
Since they had no use in the current code anyway, I don't consider
this a problem.

I took the liberty of adding basic instructions to the error message
but these can't be i18n'd properly so I kept it short and sweet.

---

Side effect of expired credentials is Mihon erasing the token in
storage, meaning AL disappears from the tracker sheet until re-linked.
I would say this is acceptable, but we might see panicked users in
support saying "Mihon deleted my AL links" or something.
2026-09-04 21:07:05 +06:00
천재웅 056d9baeeb Migrate composeGrid to new group ID (#3877) 2026-08-30 17:45:42 +00:00
MajorTanya baad5c59bb Clean up some missed unused imports (#3876) 2026-08-30 23:43:36 +06:00
AntsyLich 34a33ed4f8 Use filled icon for library continue reading button 2026-08-30 23:30:28 +06:00
AntsyLich 7f342ca076 Use built-in DelegateLastClassLoader for extensions (#3874)
Assisted-by: Claude:claude-opus-5
2026-08-29 16:07:51 +00:00
AntsyLich b695940114 Switch to Material Symbols and use Valkyrie for ImageVector generation (#3873)
* Add material symbols icon module

Assisted-by: Claude:claude-opus-5

* Replace material icons with material symbols

Assisted-by: Claude:claude-opus-5

* Add simple icons module and migrate CustomIcons

Assisted-by: Claude:claude-opus-5
2026-08-29 21:39:55 +06:00
w bb24e904a9 Bump webgpuviewer, fix navigation directions and long strip bounds (#3870)
* Keep previous page when jumping pages

* Fix navigation directions

* fix continuous jump after navigate

* webgpuviewer config

* Fade in loaded pages

* async onPageChange

* Update libs.versions.toml
2026-08-28 17:42:37 +00:00
AntsyLich 5fadea61e7 Make the source manager surface suspend (#3869)
Assisted-by: Claude:claude-opus-5
2026-08-28 23:36:28 +06:00
w 0854bde12e Bump webgpuviewer, imagedecoder, fixes (#3852)
* Bump webgpuviewer, imagedecoder, fixes

Render transition page using text renderer
Fix progress page in dual
Fix animations in dual
Re-do crop bounds

* Fix navigation buttons and zoom start

* Update libs.versions.toml
2026-08-26 19:24:32 +06:00
w e3813028bd Bump webgpuviewer, fix animated images background color (#3843) 2026-08-23 14:06:12 +06:00
AntsyLich 270b78ba95 Wait for extensions to load before the list is propagated (#3841) 2026-08-22 20:37:01 +00:00
AntsyLich 46c8f07c12 Limit vertical divider height in global search toolbar (#3839) 2026-08-22 19:56:26 +00:00
AntsyLich a2c24ff042 Use upstream scaffold (#3834) 2026-08-22 02:22:45 +00:00
MajorTanya 31d3c23717 Migrate to Kitsu's GraphQL API (#3792)
While there are still some nasty corners (multiple shapes of error
response, unhandled error types on their end, etc.), this is a
functional, feature-parity replacement for the JSON:API API we were
using before.

According to the GraphQL docs, searching by title still goes via
Algolia.
2026-08-22 04:46:35 +06:00
w 497e266256 Fix page loading for webgpuviewer and bump version (#3823) 2026-08-20 18:15:18 +00:00
MajorTanya 0974e787ad Use Shikimori's update endpoint (#3810)
No idea why it was originally going via the
addition endpoint but Shikimori's v1 and v2 APIs
have a dedicated endpoint to update a list entry
via PATCH or PUT (interchangeable, both allow
partial payloads).

Splitting off the update path revealed that
findLibManga would return a non-null track, which
in turn causes the update call to fail with a 404
due to `library_id` being null.

After further investigation, I realised that
findLibManga should always return null if the
title is not in the user's library, not just in
refreshes.
2026-08-21 00:12:48 +06:00
MajorTanya 01bfaa99ad Add support for using the user's chosen Kitsu rating scales (#3818)
Add support for different Kitsu rating scales

Includes a database migration because we have been scaling Kitsu's
2-20 `ratingTwenty` integer value to a 1-10 (step 0.5) value and
stored that in the database.

I'm also "rounding" the values to the next lowest valid one in the
current rating system to mirror Kitsu's behaviour for this. Both Kitsu
and the app keep the misfit value around until the score is otherwise
edited, at which point the interface constrains the user selection to
only valid values (for the current system).

Maybe the RatingSystem data class is overkill, but a previous version
of mine had three constants for each system that had to be manually
associated at each corner. Encapsulating those in a little map of data
classes seemed the more ergonomic solution.
2026-08-21 00:11:27 +06:00
MajorTanya 3cc0d2c324 Trim MAL & MB id: query before lookup (#3793)
This was included for all other trackers in #3776 but these two had
prefix search before.

It's a small change, but it can go a long way when using `id:` with
copy-pasted IDs from elsewhere which come with starting or trailing
whitespace.
2026-08-17 23:43:50 +06:00
w f75f2598a3 Fix fit height to in new renderer and bump webgpuviewer (#3801) 2026-08-17 23:08:09 +06:00
MajorTanya c613b52503 Add score info to MangaUpdates search results (#3795)
Also added author info for `id:` prefix search results since those hit
the single-series endpoint instead of `/search`, which does not
include author information (I wish it did).

Maybe unintuitive but the info is nice to have when available.
2026-08-17 16:28:25 +06:00
AntsyLich b2015d1ef3 Migrate to Metro DI (#3608)
Assisted-by: Claude:claude-opus-5
2026-08-16 18:47:48 +00:00
AntsyLich 5fa5f7e159 Load extensions off the main thread (#3788)
Assisted-by: Claude:claude-opus-5
2026-08-16 16:35:38 +00:00
w 00fb597ae9 Drop legacy decoder (#3786) 2026-08-16 15:48:58 +00:00
MajorTanya a81b7bce9a Add id: prefix search for rest of third-party trackers (#3776)
* Add id: prefix search to AniList

* Add id: prefix search to Bangumi

* Add id: prefix search to Kitsu

* Add id: prefix search to MangaUpdates

* Add id: prefix search to Shikimori

* Add id: prefix search to Hikka

Since Hikka doesn't use integer IDs and instead relies solely on a slug system,
users have to supply the slug to the `id:` search (so not `id:123` but
`id:sousou-no-frieren-97e05f` to get the Frieren manga specifically)

It's asymmetrical to the other trackers, but I thought keeping the prefix
consistent was more important than to be true to the tracker's internal
workings.

* Parse MU string IDs as base36 Longs

Turns out that's what the random strings in the URL are.

Co-authored-by: BrutuZ <7104931+BrutuZ@users.noreply.github.com>

* [skip ci] Add Changelog

---------

Co-authored-by: BrutuZ <7104931+BrutuZ@users.noreply.github.com>
2026-08-16 03:51:54 +06:00
Secozzi abdecb3cb4 Show updates and upcoming filter icon as active for categories (#3772) 2026-08-15 21:19:05 +06:00
AntsyLich ed30766a9f Match WebGPU reader background and transition colors to the old reader (#3765)
Assisted-by: Claude:claude-opus-5
2026-08-14 20:50:56 +00:00
AntsyLich b1efee47f5 Replace StateViewModel with explicit backing fields (#3763)
Assisted-by: Claude:claude-opus-5
2026-08-14 19:53:06 +00:00
AntsyLich d00efa4bfc Make LibraryViewModel collect library only while subscribed (#3762)
Assisted-by: Claude:claude-opus-5
2026-08-14 19:39:22 +00:00
AntsyLich b1a9a05926 Make UpdatesViewModel collect updates only while subscribed (#3761)
Assisted-by: Claude:claude-opus-5
2026-08-14 19:39:04 +00:00
AntsyLich b393088cfa Rename preview build type to nightly and label FOSS builds (#3760)
Assisted-by: Claude:claude-opus-5
2026-08-15 01:20:55 +06:00
w 5c3ae37d52 Add high quality WebGPU renderer (#3388) 2026-08-14 23:01:00 +06:00
MajorTanya cd1f426945 Fix wrong MangaBaka scores for step sizes > 1 (#3740)
* Fix wrong MangaBaka scores for step sizes > 1

We're actually sending the index of the score type in the list, not
the score itself.

Overriding indexToScore solves that issue.

Also refactored the ranges to be constants for consistency.

* Changelog
2026-08-12 20:38:49 +06:00
AntsyLich 77a1a5afbd Make ExtensionsViewModel collect extensions only while subscribed (#3729)
Assisted-by: Claude:claude-opus-5
2026-08-08 20:05:11 +06:00
AntsyLich a494ebd791 Make HistoryViewModel collect history only while subscribed (#3728)
Assisted-by: Claude:claude-opus-5
2026-08-08 20:04:41 +06:00
AntsyLich c68efd0e86 Make DownloadQueueViewModel collect downloads only while subscribed (#3727)
Assisted-by: Claude:claude-opus-5
2026-08-08 20:04:29 +06:00
AntsyLich ae37c1651a Make ExtensionDetailsViewModel collect sources only while subscribed (#3726)
Assisted-by: Claude:claude-opus-5
2026-08-08 20:04:17 +06:00
AntsyLich 62288c08fb Make UpcomingViewModel collect manga only while subscribed (#3725)
Assisted-by: Claude:claude-opus-5
2026-08-08 20:04:05 +06:00
AntsyLich 3cb9883d62 Make MigrateSourceViewModel collect sources only while subscribed (#3723)
Assisted-by: Claude:claude-opus-5
2026-08-08 11:59:17 +06:00
AntsyLich fab4cbd279 Make MigrateMangaViewModel collect favorites only while subscribed (#3722)
Assisted-by: Claude:claude-opus-5
2026-08-08 11:59:04 +06:00
AntsyLich 6c0058d230 Make SourcesViewModel collect sources only while subscribed (#3721)
Assisted-by: Claude:claude-opus-5
2026-08-08 11:58:52 +06:00
AntsyLich 2aec7d19c0 Make CategoryViewModel collect categories only while subscribed (#3720)
Assisted-by: Claude:claude-opus-5
2026-08-08 11:58:41 +06:00
AntsyLich bb9767c9df Make SourcesFilterViewModel collect sources only while subscribed (#3719)
Assisted-by: Claude:claude-opus-5
2026-08-08 11:58:30 +06:00
AntsyLich 864281af7d Make ExtensionFilterViewModel collect languages only while subscribed (#3718)
Assisted-by: Claude:claude-opus-5
2026-08-08 11:58:18 +06:00