1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00

Support for searching for Hebrew subtitles

https://www.filebot.net/forums/viewtopic.php?f=6&t=4898
This commit is contained in:
Reinhard Pointner 2017-03-31 17:21:07 +08:00
parent 82f34a0043
commit 6145508272
2 changed files with 9 additions and 2 deletions

View File

@ -245,7 +245,13 @@ public final class FileUtilities {
detector.setText(in);
CharsetMatch match = detector.detect();
if (match != null) {
return match.getReader();
Reader reader = match.getReader();
if (reader != null) {
return reader;
}
// reader may be null if detected character encoding is not supported
debug.warning("Unsupported charset: " + match.getName());
}
}

View File

@ -457,7 +457,8 @@ public class OpenSubtitlesClient implements SubtitleProvider, VideoHashSubtitleS
});
// some additional special handling
subLanguageMap.put("pb", "pob");
subLanguageMap.put("iw", "heb"); // Hebrew
subLanguageMap.put("pb", "pob"); // Brazilian Portuguese
subLanguageMap.put("zh", "chi"); // Chinese (Simplified)
subLanguageMap.put("tw", "zht"); // Chinese (Traditional)