Anime themes has type Collection<GenreEntity<AnimeGenre>>
fbaierl opened this issue · 3 comments
I am not sure if maybe I am misunderstanding something here, but the themes inside the Anime class are defined like this:
/** The themes. */
public Collection<GenreEntity<AnimeGenre>> themes = Collections.emptyList();
Isn't this the wrong type?
It looks like so at first glance, but MyAnimeList sees genres and themes as the same thing internally. Let's use Sword Art Online as an example (Jikan, MAL). If we check the url
s for themes, they all point to genres:
{
"data": {
...
"genres": [
{
"mal_id": 1,
"type": "anime",
"name": "Action",
"url": "https:\/\/myanimelist.net\/anime\/genre\/1\/Action"
},
...
],
...
"themes": [
{
"mal_id": 64,
"type": "anime",
"name": "Love Polygon",
"url": "https:\/\/myanimelist.net\/anime\/genre\/64\/Love_Polygon"
},
...
]
}
}
What I also noticed is that AnimeGenre
and possibly MangaGenre
are now outdated, as MAL seems to have added 38 new genres/themes that we don't have available.
Thank you for this issue into my attention. I'll prepare a new release to include the new genres.
Ah I see, this seems to be my misunderstanding then. I thought "themes" referes to the opening and ending soundtracks.
Thanks for your fast reply.
Yup, kind of confusing for MAL/Jikan to call openings and endings themes. Unfortunately that information has to be fetched separately, via AnimeThemesQuery
or jikan.query().anime().themes(animeId).execute().block()
.