mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 00:38:52 -05:00
Improved error reporting for people that do --db TheTVDB --lang ITA
This commit is contained in:
parent
e43e5f9f17
commit
ec0f9293c7
@ -83,6 +83,12 @@ public class TheTVDBClient extends AbstractEpisodeListProvider {
|
||||
public String getLanguageCode(Locale locale) {
|
||||
String code = locale.getLanguage();
|
||||
|
||||
// sanity check
|
||||
if (code.length() != 2) {
|
||||
// see http://thetvdb.com/api/BA864DEE427E384A/languages.xml
|
||||
throw new IllegalArgumentException("Expecting 2-letter language code: " + code);
|
||||
}
|
||||
|
||||
// Java language code => TheTVDB language code
|
||||
if (code.equals("iw")) // Hebrew
|
||||
return "he";
|
||||
|
Loading…
Reference in New Issue
Block a user