Page 1 of 1

Want .srt file link from openSubtitle Android SDK

Posted: Tue Jun 18, 2019 6:12 pm
by iamrealhamza
I've integrated openSubtitle Android sdk to my app to get the srt file link as I want to pass srt file link to my player in app with video url.. So this sdk returns me zip download link, gz download link and osLink, srt File name (not url). I want to get .srt file link. please help me.
I'm using this code to get subtitle files

Code: Select all

URL serverUrl = new URL("https", "api.opensubtitles.org", 443, "/xml-rpc"); OpenSubtitlesClient osClient = new OpenSubtitlesClientImpl(serverUrl); ServerInfo serverInfo = osClient.serverInfo(); osClient.login("[email protected]", "mypassword", "en", "TemporaryUserAgent"); // searching for subtitles matching a file List<SubtitleInfo> subtitles = osClient.searchSubtitles("eng", "Baskets", "4", "1"); if(subtitles.size() > 0) { SubtitleInfo subtitleInfo = subtitles.get(0); List<SubtitleFile> subtitleFiles = osClient.downloadSubtitles(subtitleInfo.getSubtitleFileId()); }

Re: Want .srt file link from openSubtitle Android SDK

Posted: Sat Jun 22, 2019 7:01 am
by oss
this must be so easy, that I believe you get it already. can you see what data is returned in some Dumper / Debugger...?

Re: Want .srt file link from openSubtitle Android SDK

Posted: Mon Aug 31, 2020 12:40 pm
by mitab86
I am also experiencing the same problem. How have you fixed the requirement? Is there any other api to get just .srt file?

Re: Want .srt file link from openSubtitle Android SDK

Posted: Sat Sep 05, 2020 6:35 pm
by oss
maybe good idea to look into work-in-progress:
https://www.opensubtitles.com/docs/api/html/index.htm