jikan-me / jikan-rest

The REST API for Jikan
https://docs.api.jikan.moe/
MIT License
413 stars 268 forks source link

🐛 Seasons endpoint includes not yet aired item #481

Closed pushrbx closed 5 months ago

pushrbx commented 5 months ago

Is there an existing issue for this?

Current Behavior

When I send a request to GET https://api.jikan.moe/v4/seasons/now it includes entries which are not yet aired. As of writing it's the winter season, and Oshi no ko's second season appears on the list.

Expected Behavior

/v4/seasons/now endpoint should exclude those entries which has not yet been aired.

Steps To Reproduce

  1. GET https://api.jikan.moe/v4/seasons/now
  2. Look for Oshi no ko season 2

Environment

public api

Anything else?

No response

pushrbx commented 5 months ago

I've triaged this, and on MAL the "aired string" looks like the following for oshi no ko second season: 2024 to ? Because of this the "aired.from" field in the database is set to "2024.01.01", and the query to filter the db results doesn't take into account the "aired.string" being weird.