SubLanguageID for Hebrew is wrong

All your suggestions, requests and ideas for future development
Post Reply
eloon
Posts: 2
Joined: 31 Mar 2017, 07:52

SubLanguageID for Hebrew is wrong

Post by eloon »

Hey, just downloaded CLI for mac and downloading Hebrew subtitles doesn't seem to work

My system info:

Code: Select all

FileBot 4.7.8 (r4846)
JNA Native: 5.1.0
MediaInfo: 0.7.92.1
7-Zip-JBinding: 9.20
Chromaprint: 1.1.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-03-24 (r490)
Groovy: 2.4.8
JRE: Java(TM) SE Runtime Environment 1.8.0_121
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 14 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
Data: /Users/someone/.filebot
When i type in

Code: Select all

filebot -get-subtitles myfiledirectory.mp4 --lang he --output srt --encoding ISO8859-8 -non-strict

all i get is:

Code: Select all

Get [Hebrew] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
Failed to compute hash
java.lang.IllegalArgumentException: SubLanguageID not found: iw_IL
	at net.filebot.web.OpenSubtitlesClient.getSubLanguageID(OpenSubtitlesClient.java:484)
	at net.filebot.web.OpenSubtitlesClient.getLanguageFilter(OpenSubtitlesClient.java:468)
	at net.filebot.web.OpenSubtitlesClient.lambda$getSubtitleListByHash$11(OpenSubtitlesClient.java:220)
	at net.filebot.web.OpenSubtitlesClient.getSubtitleList(OpenSubtitlesClient.java:204)
	at net.filebot.web.OpenSubtitlesClient.getSubtitleListByHash(OpenSubtitlesClient.java:216)
	at net.filebot.web.OpenSubtitlesClient.getSubtitleList(OpenSubtitlesClient.java:181)
	at net.filebot.subtitle.SubtitleUtilities.lookupSubtitlesByHash(SubtitleUtilities.java:70)
	at net.filebot.cli.CmdlineOperations.getSubtitles(CmdlineOperations.java:693)
	at net.filebot.cli.CmdlineOperations.getMissingSubtitles(CmdlineOperations.java:780)
	at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:79)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:26)
	at net.filebot.Main.main(Main.java:115)

Lookup by hash failed: SubLanguageID not found: iw_IL
Looking up subtitles by name via OpenSubtitles
Search by name failed: SubLanguageID not found: iw_IL
No matching subtitles found
When i try english subtitles it works perfectly. I think it has to do with the fact opensubtitles's id for Hebrew, from what i found, is heb and not iw_IL.

Thanks for the help! :D
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: SubLanguageID for Hebrew is wrong

Post by rednoah »

Fixed with r4966.
:idea: Please read the FAQ and How to Request Help.
eloon
Posts: 2
Joined: 31 Mar 2017, 07:52

Re: SubLanguageID for Hebrew is wrong

Post by eloon »

Thanks! works perfectly now! :P :D
thielj
Posts: 55
Joined: 05 Nov 2017, 22:15

Re: SubLanguageID for Hebrew is wrong

Post by thielj »

Hi, I think I came across another Hebrew-related issue

https://www.themoviedb.org/movie/12581-shiva has "Hebrew" as spoken language, but comes up with an empty {languages} binding in the movie renamer script.

It may be caused by Java's handling of old ('iw') and new ('he') language codes for Hebrew:

https://stackoverflow.com/questions/139 ... dish-yi-an
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: SubLanguageID for Hebrew is wrong

Post by kim »

Binding "languages": undefined

Code: Select all

{info.spokenLanguages}
works just fine, but yes it displays
[iw]
the API say:
spoken_languages
iso_639_1: "he"
name: "עִבְרִית"
also problem in GUI:
when set to Hebrew it uses "language=iw-IL"
and after that is uses "language=iw"
either will get the Hebrew title of the movie

it must be "language=he-IL" to work
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: SubLanguageID for Hebrew is wrong

Post by rednoah »

I see. Fixed with r5235.
:idea: Please read the FAQ and How to Request Help.
Post Reply