Hi,
after matching a movie in my custom script, I would like to download subtitles from opensubtitles by filebot.web.Movie or by specifying the IMDB id if no subtitles are found for the files hash.
Is there any function for this? Could this be added?
Thanks alot!
Getting subtitles for filebot.web.Movie (or by IMDB ID)
Re: Getting subtitles for filebot.web.Movie (or by IMDB ID)
net.filebot.WebServices.OpenSubtitles.xmlrpc.searchSubtitles(2024544, "eng"), which should query by imdbid
results in this:
NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
at redstone.xmlrpc.XmlRpcSerializer.serialize(Unknown Source)
at redstone.xmlrpc.XmlRpcClient.invoke(Unknown Source)
at net.filebot.web.OpenSubtitlesXmlRpc.invoke(OpenSubtitlesXmlRpc.java:345)
at net.filebot.web.OpenSubtitlesClient$OpenSubtitlesXmlRpcWithRetryAndFloodLimit.invoke(OpenSubtitlesClient.java:721)
at net.filebot.web.OpenSubtitlesXmlRpc.searchSubtitles(OpenSubtitlesXmlRpc.java:99)
at net.filebot.web.OpenSubtitlesXmlRpc.searchSubtitles(OpenSubtitlesXmlRpc.java:93)
at Script1$_run_closure3.doCall(Script1.groovy:278)
at net.filebot.cli.ScriptShellMethods.eachMediaFolder(ScriptShellMethods.java:187)
at Script1.run(Script1.groovy:91)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:116)
at net.filebot.Main.main(Main.java:169)
results in this:
NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
at redstone.xmlrpc.XmlRpcSerializer.serialize(Unknown Source)
at redstone.xmlrpc.XmlRpcClient.invoke(Unknown Source)
at net.filebot.web.OpenSubtitlesXmlRpc.invoke(OpenSubtitlesXmlRpc.java:345)
at net.filebot.web.OpenSubtitlesClient$OpenSubtitlesXmlRpcWithRetryAndFloodLimit.invoke(OpenSubtitlesClient.java:721)
at net.filebot.web.OpenSubtitlesXmlRpc.searchSubtitles(OpenSubtitlesXmlRpc.java:99)
at net.filebot.web.OpenSubtitlesXmlRpc.searchSubtitles(OpenSubtitlesXmlRpc.java:93)
at Script1$_run_closure3.doCall(Script1.groovy:278)
at net.filebot.cli.ScriptShellMethods.eachMediaFolder(ScriptShellMethods.java:187)
at Script1.run(Script1.groovy:91)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:116)
at net.filebot.Main.main(Main.java:169)
Re: Getting subtitles for filebot.web.Movie (or by IMDB ID)
Have a look at class OpenSubtitlesClient as an example on how to use class OpenSubtitlesXmlRpc:
https://github.com/svn2github/filebot/b ... lient.java
Your call looks about right:
https://github.com/svn2github/filebot/b ... c.java#L92
But there's probably something unexpected happening with Groovy parameter conversion / method selection.
e.g.
* use '...' to make sure it's a String, not a GString
* use String[] instead of varargs
* try int or Integer if one or the other doesn't work
https://github.com/svn2github/filebot/b ... lient.java
Your call looks about right:
https://github.com/svn2github/filebot/b ... c.java#L92
But there's probably something unexpected happening with Groovy parameter conversion / method selection.
e.g.
* use '...' to make sure it's a String, not a GString
* use String[] instead of varargs
* try int or Integer if one or the other doesn't work