Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
iamrealhamza
Posts: 1
Joined: Tue Jun 18, 2019 6:02 pm

Want .srt file link from openSubtitle Android SDK

Tue Jun 18, 2019 6:12 pm

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()); }

User avatar
oss
Site Admin
Posts: 5878
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Want .srt file link from openSubtitle Android SDK

Sat Jun 22, 2019 7:01 am

this must be so easy, that I believe you get it already. can you see what data is returned in some Dumper / Debugger...?

mitab86
Posts: 1
Joined: Fri Oct 18, 2019 4:18 am

Re: Want .srt file link from openSubtitle Android SDK

Mon Aug 31, 2020 12:40 pm

I am also experiencing the same problem. How have you fixed the requirement? Is there any other api to get just .srt file?

User avatar
oss
Site Admin
Posts: 5878
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Want .srt file link from openSubtitle Android SDK

Sat Sep 05, 2020 6:35 pm

maybe good idea to look into work-in-progress:
https://www.opensubtitles.com/docs/api/html/index.htm

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 34 guests