Closed gnawf closed 9 years ago
Can be reproduced by setting the title_language_preference
parameter to english
:
https://hummingbird.me/api/v1/anime/4696?title_language_preference=english
Probably related to 0a3c19a10bb320e73ee8b9658748cadfa75e2a68, or more specifically, this line. I don't know Ruby, but is this because alt_title
is empty string rather than nil
for these series?
Ah. I didn't know that you could supply the preference language like that, thanks.
I've looked at this issue and @erengy was right on the exactly problematic line. It happens because there's some titles there is just an empty string on the database, so rails think it's a valid string. Unfortunately this fact slipped though me when I refactored the code, but I'll send a fix for it asap.
Indeed, it appears those are shows that have an empty title in the database, because in the official web site they also appear as empty when searching for them. If that's the case, then the API is not really broken in this regard and should be fixed in the database instead?
I think there's still an issue with canonical
title preference.
URL | title |
---|---|
/api/v1/anime/7898 | :x: |
/api/v1/anime/7898?title_language_preference=canonical | :x: |
/api/v1/anime/7898?title_language_preference=english | :white_check_mark: |
/api/v1/anime/7898?title_language_preference=romanized | :white_check_mark: |
Also, alternate_title
should be empty in the third case, rather than returning the same value. But obviously this is a minor issue.
Some anime objects returned by APIv1 have an empty
title
value when English is selected as the primary language.Excerpt from api/v1/anime/durarara?title_language_preference=english
Other affected titles include aldnoah-zero-2, hunter-x-hunter-2011, psycho-pass, eureka-seven