[[PageOutline(3-4, Sections)]] == !CheckSubHash == === Intro === check if given subtitle files are already stored in the database ---- === Description === '''struct !CheckSubHash(string $token, array($subhash, $subhash, ...) $hashes)''' This function returns subtitle file IDs for given subtitle file hashes. This can be used to quickly check (for a large list of subtitle files) which subtitle files are already stored in the database (e.g. before uploading). ---- === Parameters === ''token (required)'':: token string identifying user's session, taken from [wiki:XmlRpcLogIn LogIn] output structure. ''hashes (required)'':: array of subtitle file hashes (MD5 hashes of subtitle file contents) ---- === Return Values === Output is returned in this structure: {{{ struct( (string) [status], struct( (string) [], (string) [], ) [data], (double) [seconds] ) }}} and contains these elements: ''status'':: function result code, see [wiki:XmlRpcStatusCode list of status codes] ''data'':: contains key/value pairs where key is the subtitle file hash and value is subtitle file ID (if found) ''seconds'':: time taken to execute this command on server The value in the struct for missing movies will be int(0), not string! ---- === Implementations === There are currently no available sample implementations. ---- === Changelog === Version 1: created this function ---- === Examples === ==== Input ==== {{{ #!xml CheckSubHash gqb4qjfkc66vb0sarm8j60o3t7 b76fb8e344e771de7df3f735c2f216bc 84b3ecc07aa36820449c287e2f1d345d ... more subtitle file hashes go here (if any) ... }}} ==== Output ==== {{{ #!xml status 200 OK data b76fb8e344e771de7df3f735c2f216bc 1951678165 84b3ecc07aa36820449c287e2f1d345d 1951915776 ... more subtitle file hashes go here (if any) ... seconds 0.207 }}} ---- === Notes === none yet ---- === See also === * [wiki:XmlRpcCheckMovieHash CheckMovieHash] ---- === Comments === add your comments, hints and suggestions here if you like ... -------- [wiki:XmlRpcCheckMovieHash Prev (CheckMovieHash)] [wiki:XmlRpcIntro Home] [Next]