Closed AniLeo closed 1 week ago
In this case somebody has to spell it out for me what needs to happen. You can't just say it has to match MAL, as I have no idea what MAL is doing. :crying_cat_face:
@AniLeo
Anime like One Piece and even Frieren are part of the winter 2024 season as they fall under "TV (Continuing)"
Also, MAL has a lot of other types of anime:
that they're not showing on the seasons screen it seems
For example, we also return the following type of entries: https://api.jikan.moe/v4/seasons/2024/winter?page=1&filter=music (43 entries) https://api.jikan.moe/v4/seasons/2024/winter?page=1&filter=PV (14 entries) https://api.jikan.moe/v4/seasons/2024/winter?page=1&filter=CM (17 entries) https://api.jikan.moe/v4/seasons/2024/winter?page=1&filter=tv_special (23 entries)
Etc. That's already 97 entries in addition. And if we check the responses, most of the entries are continuing from past years and are still in "Airing". Their status are 1:1 with what MAL is showing for those entries as well.
But https://api.jikan.moe/v4/seasons/2024/winter?page=1 showing continuing anime also up front; while that logically makes sense as MAL is also returning the entries sorted by their members it might not make sense with it showing up front all the time for every season. MAL has also segregated into their own categories on the UI.
@pushrbx
So perhaps the fix here could be to just not return continuing anime by default (as this affects not just TV types but all types of entries) and have a flag for it (e.g ?continuing
).
Our number of entries would always still be higher than what MAL returns because we're providing complete data which is fine IMO but at least we'd have more accurate data displayed up front by default. What do you guys think?
@irfan-dahir You're right, my bad for missing the continuing ones; MAL also has them and they're part of the "Entries" count at the top of the page, so even if we have 97 entries of types that are not accounted for we're still at around 310 anime as opposed to the 516 entries returned by the endpoint
I looked into some entries and noticed that anime that has airing date finishing this season is displayed on subsequent seasons as if it was continuing there
For example: https://myanimelist.net/anime/54492/Kusuriya_no_Hitorigoto
It's displayed on every season of the year https://api.jikan.moe/v4/seasons/2024/winter?page=1 https://api.jikan.moe/v4/seasons/2024/spring?page=1 https://api.jikan.moe/v4/seasons/2024/summer?page=1 https://api.jikan.moe/v4/seasons/2024/fall?page=1
And it has an end of airing date Aired: Oct 22, 2023 to Mar 24, 2024
If you check the next season (Spring 2024), the only anime that is listed in TV (Continuing) is https://myanimelist.net/anime/57218/Geomeongsupeul_Jikyeola_Birdy_Friends which has an end date of May 16, 2024
Following this behaviour, it seems that airing anime that has unknown end date should only be included on the current season, not on future ones
While I was checking this, something else that I noticed that's weird and might need to be split into its own separate ticket, is that the API reports an inconsistent amount of items depending on the page you're on
page 1 reports pagination->items->total as 516, but every subsequent page reports a total of 479 https://api.jikan.moe/v4/seasons/2024/winter?page=1 https://api.jikan.moe/v4/seasons/2024/winter?page=2 page 1 also reports last page as 21 while subsequent pages report last page as 20
Following this issue.
Many shows such as https://myanimelist.net/anime/51180/Youkoso_Jitsuryoku_Shijou_Shugi_no_Kyoushitsu_e_3rd_Season (airing only this season) appear in API calls to future seasons like https://api.jikan.moe/v4/seasons/2024/spring?page=1&filter=tv
Found the bit of code which is responsible for the inclusion of "Youkoso_Jitsuryoku_Shijou_Shugi_no_Kyoushitsu_e_3rd_Season" in the spring season: https://github.com/jikan-me/jikan-rest/blob/a415418ebf95830992b07ccc8cb51bfd8b1a4758/app/Repositories/DefaultAnimeRepository.php#L143-L147
@AniLeo
While I was checking this, something else that I noticed that's weird and might need to be split into its own separate ticket, is that the API reports an inconsistent amount of items depending on the page you're on
page 1 reports pagination->items->total as 516, but every subsequent page reports a total of 479 https://api.jikan.moe/v4/seasons/2024/winter?page=1 https://api.jikan.moe/v4/seasons/2024/winter?page=2 page 1 also reports last page as 21 while subsequent pages report last page as 20
This happens time to time because of some long existing cache issue.
Also are you ok with irfan's proposed fix?
So perhaps the fix here could be to just not return continuing anime by default (as this affects not just TV types but all types of entries) and have a flag for it (e.g ?continuing).
@pushrbx yes, for me the addition of the flag, as well as fixing the airing bug that you pointed out in the code is good to solve this ticket
If we have other specific cases that don't match what's in MAL I will get back to you in the future with specific details for these cases
Thank you!
Yes, having a continuing flag would be great and so that way the API would return long running seasonal's such as One Piece
I have a feeling that there is a need for an additional param here. One that sets how many seasons back the result set should go in case of ongoing items.
Just to give you an idea, on livechart there is an ongoing filter:
Is there an existing issue for this?
Current Behavior
Seasons endpoint for 2024 winter returns 516 anime, with a lot of unrelated anime such as "One Piece" being included in the season https://api.jikan.moe/v4/seasons/2024/winter?page=1
Expected Behavior
According to MAL, there are 203 entries in the same season https://myanimelist.net/anime/season/2024/winter
Steps To Reproduce
Access https://api.jikan.moe/v4/seasons/2024/winter?page=1 See pagination -> items -> total at 516
Environment
Anything else?
I suspect this is a regression from #513