mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-02 08:25:02 -04:00
Request preferred language and/or English (not supported by the API right now, but might in the future)
This commit is contained in:
parent
791fa79658
commit
74445dcc43
@ -73,7 +73,7 @@ public class TheTVDBClient extends AbstractEpisodeListProvider implements Artwor
|
||||
|
||||
// TODO support for default language => https://trello.com/c/dyEhtfky/16-handle-multiple-languages-in-the-accept-language-header
|
||||
if (locale != null && locale != Locale.ROOT) {
|
||||
header.put("Accept-Language", locale.getLanguage());
|
||||
header.put("Accept-Language", Stream.of(locale, Locale.ENGLISH).map(Locale::getLanguage).distinct().collect(joining(", ")));
|
||||
}
|
||||
header.put("Accept", "application/json");
|
||||
header.put("Authorization", "Bearer " + getAuthorizationToken());
|
||||
|
Loading…
Reference in New Issue
Block a user