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

MAL API may respond with WEBP as the main picture #1191

Open
koteq opened this issue May 26, 2024 · 3 comments
Open

MAL API may respond with WEBP as the main picture #1191

koteq opened this issue May 26, 2024 · 3 comments
Milestone

Comments

@koteq
Copy link

koteq commented May 26, 2024

Well, I'm not sure if Taiga can, or even should handle this case, but still, I want to open an issue to register an odd edge case.

Here is an example, when I open the Anime Information dialog for Jujutsu Kaisen 2nd Season it shows me a question mark.

image

While in logs, I see Taiga attempts to download https://cdn.myanimelist.net/images/anime/1792/138022.webp image.

2024-05-26 21:00:03 [Debug] http.cpp:128 taiga::http::detail::SendRequest | URL: https://cdn.myanimelist.net/images/anime/1792/138022.webp
2024-05-26 21:00:08 [Debug] http.cpp:128 taiga::http::detail::SendRequest | URL: https://cdn.myanimelist.net/images/anime/1792/138022.webp

Taiga even writes the WEBP image under Taiga\data\db\image\51009.jpg, even though it isn't a valid JPEG.

image
@koteq koteq changed the title MAL API may use WEBP as the main picture MAL API may respond with WEBP as the main picture May 26, 2024
@erengy
Copy link
Owner

erengy commented Oct 26, 2024

Not sure if this is still an issue, Jujutsu Kaisen 2nd Season returns 138022.jpg at the moment. I couldn't find any info other than this topic, which is left unanswered.

Qt supports WEBP format via an add-on module, so it should be possible to read/write .webp files in v2.

@koteq
Copy link
Author

koteq commented Oct 26, 2024

I accumulated 23 WEBP images under the data\db\image\ folder. However, after visiting the information page of each corresponding anime, I fixed/replaced more than half of the images with JPEGs—I guess MAL personnel updates images over time. Here is a list of MAL anime IDs that seem to continue returning WEBP cover images.

43690
40935
49363
40530
41109
39617
42822
40429
41290
48616
48615

@erengy
Copy link
Owner

erengy commented Oct 26, 2024

Thanks for the list. Weirdly enough, the website currently displays JPEG images for all those anime, while the API keeps returning WEBP images. Probably not intended on their end.

In any case, I'll try to make v2 more robust against different formats.

@erengy erengy added this to the v2.0 milestone Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants