-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add locale for each request #3
Comments
Not sure what you mean, can you explain? |
If you call ImdbApi.setLocale(Locale) then the locale will be passed to ApiBuilder.setLocale(Locale). This is fine in single threade environments where every request wants the same locale. The static reference can be there; as default, But then there should be the possibilit to give a different locale per request. The same is done in TheTVApi and TheMovieDBApi where you pass the language for every request instead of setting a static reference for language in those APIs. I came to this, cause the ImdbApi does not deliver the same results for different locales; cause some values are localized. Let's regard the cast list: if I use Locale.US everything is fine, but for Locale the role is localized, so that you "(uncredited)" with Locale.US is not the same than with Locale.DE cause the additional values of roles are localized. That makes it very hard to decide for multiple languages if a actor is uncredited or not .. as example. |
Furtheron I investigated that the API does not return all informations from the web page. |
Just another thing: |
You have to remember that this is an "undocumented" API and that most of this is just guess work as to what does and doesn't work in terms of data. I will refactor to make the locale a per-method call. |
I know ... :-) ... Much better, that you have "documented" somehow ... :-) |
For each request a common locale should be set; if not set, then the default locale from ImdbApi should be used.
Reason: It makes sense to request some values without locale or with english locale.
The text was updated successfully, but these errors were encountered: