2009-05-10, 08:47
I am impressed you are doing this without asking any questions
I will explain some things anyway. Procedure for downloading subtitle is this:
I will explain some things anyway. Procedure for downloading subtitle is this:
- you must call method GetDownloadTicket with this parameters:
session: received by LogIn5 or LogInAnonymous3 methods (note you should always use methods with highest number, for example LogIn5 instead of LogIn4. Methods with lower numbers are obsolete and will be removed in future). You should login only once per application start. On application exit you should call LogOut method (for security reasons, it is also nothing wrong if you don't)plugin: if you are not using Sublight plugins and you are downloading subtitles from its native database leave this field emptyid: subtitle id you are about to download - GetDownloadTicket returns to you:
boolean result: true on success, false otherwiseque: this is important for future use. It tells you how many seconds you have to wait until you can continue with download. Method currently returns always 0 which means you can continue to download immediatelyerror: if method returns false you receive here detailed description about error
- now you can call method DownloadByID3:
sessionID: same as GetDownloadTicket session parametersubtitleID: subtitle id you want to downloadcodePage: in which ANSI codepage you want to receive subtitle. If you use -1 default encoding will be used (UTF-8). For more details check http://msdn.microsoft.com/goglobal/bb896001(en-us).aspx (column ANSI codepage)removeFormatting: should <i>...</i> tags be removed from subtitle or not (default is false which returns you original subtitle)ticket: result you received from GetDownloadTicket method - DownloadByID3 returns to you:
boolean result: true on success, false otherwisedata: Base 64 encoded ZIP file (I hope you know how to unzip this)error: if method returns false you receive here detailed description about error