Library to get in a easy way subtitles from www.opensubtitle.org
This lib is based on the project of opensubtitle info It's a wrapper to use the methods of XMLRPC that opensubtitles offer.
With just few lines you can get a list of subtitles and download them.
Init the API and set the desired params:
mASub = new AsyncSubtitles(this, this);
mASub.setLanguagesArray(new String[] { "spa" });
mASub.setNeededParamsToSearch(null, "Family guy", null, 10, 2);
mASub.getPossibleSubtitle();
Implements the listener to get the list.
@Override
public void onSubtitlesListFound(List<OSubtitle> list) {
//Return the list of subtitles found
// Let's download the first item to the desired path
mASub.downloadSubByIdToPath(list.get(0).getIDSubtitleFile(),
Environment.getExternalStorageDirectory().getAbsolutePath()+"/familyguy.srt");
}
Everything is asyncron so you can call it on your main thread. To see a better example look at the demo.