wiki:XmlRpcDownloadSubtitles

Version 1 (modified by guest, 16 years ago) (diff)

Created this page [Majky]

DownloadSubtitles

Intro

download given subtitle files


Description

struct DownloadSubtitles(string $token, array($IDSubtitleFile, $IDSubtitleFile,...) $data)

This function can be used to download multiple subtitle files at once.


Parameters

First parameter is the session token, second is the array/list of subtitle file IDs using this structure:

  array(  <--- array of subtitle file IDs
    (int), (int), ...
  )
token (required)
token string identifying user's session, taken from LogIn output structure.
data (required)
array of subtitle file IDs

Return Values

Output is returned in this structure:

  struct(
    array(
      struct( subcontents ), struct( subcontents ), ...
    ) [data],
    (double) [seconds]
  )

and contains these elements:

status
function result code, see list of status codes
data
array of subtitle file contents
subcontents
subtitle file contents, a struct with 2 members: idsubtitlefile and data (base64 encoded and gzipped subtitle file contents) {{{struct( (int) [idsubtitlefile], (string) [data] ) }}}
seconds
time taken to execute this command on server

Implementations

There are currently no available sample implementations.


Changelog

Version 1: created this function


Examples

Input

<methodCall>
 <methodName>DownloadSubtitles</methodName>
 <params>
  <param>
   <value><string>0t6bf5qt1l32ol67frupr47fg7</string></value>
  </param>
  <param>
   <value>
    <array>
     <data>
      <value><int>1951894257</int></value>
      <value><int>1951853345</int></value>
      ... more subtitle file IDs if needed go here ...
     </data>
    </array>
   </value>
  </param>
 </params>
</methodCall>

Output

<methodResponse>
 <params>
  <param>
   <value>
    <struct>
     <member>
      <name>status</name>
      <value><string>200 OK</string></value>
     </member>
     <member>
      <name>data</name>
      <value>
       <array>
        <data>
         <value>
          <struct>
           <member>
            <name>idsubtitlefile</name>
            <value><int>1951894257</int></value>
           </member>
           <member>
            <name>data</name>
            <value><string>H4sIAA ... base64-encoded and gzipped subtitle file contents ... BAA==</string></value>
           </member>
          </struct>
         </value>
         ... more subtitle file content structures go here if any ...
        </data>
       </array>
      </value>
     </member>
     <member>
      <name>seconds</name>
      <value>
       <double>0.38</double>
      </value>
     </member>
    </struct>
   </value>
  </param>
 </params>
</methodResponse>


Notes

  • you need to base64-decode and gunzip subcontents-->data to get the subtitle file contents.

See also


Comments

add your comments, hints and suggestions here if you like ...

[Prev] Home [Next]