Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mangadex: Latest Updates doesn't respect language setting #47

Open
milesoc opened this issue Jun 5, 2024 · 5 comments
Open

Mangadex: Latest Updates doesn't respect language setting #47

milesoc opened this issue Jun 5, 2024 · 5 comments

Comments

@milesoc
Copy link

milesoc commented Jun 5, 2024

When showing latest updates, Mangadex appears to pull from the latest updates in all languages.

I suspect that signing in (with an account set to load certain languages only) might help, but #29 prevents testing this.

@henderea
Copy link

henderea commented Jun 5, 2024

Signing in won't do much of anything. I know that in the MD website, the "latest update" sort order includes updates in all languages. It doesn't seem to be a language-specific property in the data. So I don't think there is a whole lot the PB source can do when the MD website has the same issue.

@milesoc
Copy link
Author

milesoc commented Jun 11, 2024

Interesting, I'll try to dig in, now that I've got it building. I know that I can set "chapter languages" in Mangadex to English only, and the Latest Updates page (/titles/latest) returns only English titles on the web. But perhaps that's web-only.

For those who want to explore this:
The API does indeed seem to lack this functionality. Latest chapters (vs latest manga) would filter more accurately on language: https://api.mangadex.org/docs/redoc.html#tag/Chapter/operation/get-chapter

However, this would make the latest category useless when someone uploads in bulk. There might be a way to do that filtering on the device side, which is where I'll try next. Not yet sure whether that level of logic is supported.

@henderea
Copy link

Well, limiting it to English titles is one thing. The issue I see is that it doesn't seem like that English-only stuff applies to the last updated sort order.

@milesoc
Copy link
Author

milesoc commented Jun 12, 2024

I have it working here:

0.8...milesoc:community-extensions:0.8

As of this moment, I have an issue with the second request I have to make to fetch the cover pages, so it looks ugly (always shows the default cover image). But I've confirmed that what I'm fetching matches this page: https://mangadex.org/titles/latest (with language set to English on the site).

I also know I still have an issue where, if too many chapters are uploaded at once, the homepage may only render a couple of manga - I would have to keep running down the pagination within the homepage to fix that. But expanding Latest Updates does work and paginate correctly.

(edit: In this case, there's no duplicate removal between pages either, therefore I need to figure out how to record all the manga that have been found across every paged request and deduplicate at that stage)

@milesoc
Copy link
Author

milesoc commented Jun 18, 2024

Have it pretty much working on the same diff. A few covers still don't load - if someone knows better than I how to log output to the application logs properly I could probably get that fixed.

It is a little slower than just loading chapters directly - it has to fetch cover art separately - so if y'all don't want to use this approach I can just keep it for my own use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants