Changes between Version 22 and Version 23 of XMLRPC


Ignore:
Timestamp:
Dec 15, 2008, 9:44:20 AM (15 years ago)
Author:
os
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • XMLRPC

    v22 v23  
    8383
    8484== !SearchSubtitles ==
    85 '''array !SearchSubtitles( $token, array(array('sublanguageid' => $sublanguageid, 'moviehash' => $moviehash, 'moviebytesize' => $moviesize, ''imdbid => $imdbid'' ),array(...)))'''
    86 
    87 This function returns information about found subtitles. It is designed making multiple search at once. Note - result is always grupped by !MovieHash, !MovieByteSize, !SubLanguageID, !IDSubMovieFile, sorted by seencount descending, max results is 250. When nothing is found, 'data' is empty. If sublanguageid is empty, or have value 'all' - it search in every sublanguage. Also, imdbid parameter is '''optional''', when used, it is not needed define moviehash and moviebytesize, so you can search subtitle database with imdbid only. Also remember you can not combine imdbid and moviehash searching in one request. Some data (!IDSubMovieFile, !MovieHash, !MovieByteSize, !MovieTimeMS) are missing in output when searching by imdbid.
    88 
    89 Example output:
    90 {{{
    91     [data] => Array
     85'''array !SearchSubtitles( $token, array(array('sublanguageid' => $sublanguageid, 'moviehash' => $moviehash, 'moviebytesize' => $moviesize, ''imdbid => $imdbid'', ''query'' => 'movie name' ),array(...)))'''
     86
     87Returns information about found subtitles. It is designed making multiple search at once. When nothing is found, 'data' is empty. If sublanguageid is empty, or have value 'all' - it search in every sublanguage, you can set it to multiple languages (e.g. eng,dut,cze).
     88
     89If you define moviehash and moviebytesize, then imdbid and query in same array are ignored. If you define imdbid, then moviehash, moviebytesize and query is ignored. If you define query, then moviehash, moviebytesize and imdbid is ignored. Pseudocode:
     90{{{
     91if(defined($moviehash) and defined($moviebytesize)) {
     92  // search by $moviehash and $moviebytesize
     93} elseif (defined($imdbid)) {
     94  // search by $imdbid
     95} elseif (defined($query)) {
     96  // fulltext search by $query
     97} else {
     98  // empty result
     99}
     100}}}
     101 * Some data (IDSubMovieFile, !MovieHash, !MovieByteSize, MovieTimeMS) are set to 0, when searching by imdbid or query
     102 * Max results is set to 500 found items
     103 * For perfect matches use moviehash/moviebytesize searching, for movie matches use imdbid searching, if you can not use any of them, use fulltext search
     104 * If used this method in movie player and subtitles are found using imdbid or query, should be nice to implement [wiki:DevReadFirst#Yourmovieplayershouldsupportautomaticuploading Automatic Uploading], so we get back movie hash of matching movie
     105
     106Example output:
     107{{{
     108   [data] => Array
    92109        (
    93110            [0] => Array
    94111                (
    95                     [IDSubMovieFile] => 739
     112                    [IDSubMovieFile] => 82181
    96113                    [MovieHash] => 09a2c497663259cb
    97114                    [MovieByteSize] => 733589504
    98                     [MovieTimeMS] => 0
    99                     [MovieFrames] => 0
    100                     [IDSubtitleFile] => 963
    101                     [SubFileName] => Night Watch (Nochnoj Dozor) (2004) [1 of 2].srt
     115                    [MovieTimeMS] => 3165000
     116                    [IDSubtitleFile] => 1951690121
     117                    [SubFileName] => Night.Watch.2004.CD1.DVDRiP.XViD-FiCO.srt
    102118                    [SubActualCD] => 1
    103                     [SubSize] => 30677
    104                     [SubHash] => 6c2bdbb308760205146cb2807dfc32f6
    105                     [IDSubtitle] => 771
    106                     [UserID] => 37047
    107                     [SubLanguageID] => eng
     119                    [SubSize] => 27287
     120                    [SubHash] => fe106fe2368799bdc73271bb24ac6df7
     121                    [IDSubtitle] => 3144301
     122                    [UserID] => 367123
     123                    [SubLanguageID] => dut
    108124                    [SubFormat] => srt
    109                     [SubSumCD] => 2
     125                    [SubSumCD] => 1
    110126                    [SubAuthorComment] =>
    111                     [SubAddDate] => 2005-05-23 07:47:04
     127                    [SubAddDate] => 2007-08-31 22:18:20
    112128                    [SubBad] => 0
    113129                    [SubRating] => 0.0
    114                     [SubDownloadsCnt] => 315
    115                     [MovieReleaseName] => AxxO
     130                    [SubDownloadsCnt] => 252
     131                    [MovieReleaseName] => Night Watch
    116132                    [IDMovie] => 516
    117133                    [IDMovieImdb] => 403358
     
    119135                    [MovieNameEng] => Night Watch
    120136                    [MovieYear] => 2004
    121                     [MovieImdbRating] => 6.3
    122                     [UserNickName] => onefox
    123                     [ISO639] => en
    124                     [LanguageName] => English
    125                     [SubDownloadLink] => http://www.opensubtitles.org/download/file/963.gz
    126                     [ZipDownloadLink] => http://www.opensubtitles.org/en/download/sub/771
    127                 )
     137                    [MovieImdbRating] => 0.0
     138                    [UserNickName] => gyoom
     139                    [ISO639] => nl
     140                    [LanguageName] => Dutch
     141                    [SubComments] => 0
     142                    [SubDownloadLink] => http://www.opensubtitles.org/en/download/file/1951690121.gz
     143                    [ZipDownloadLink] => http://www.opensubtitles.org/en/download/sub/3144301
     144                )
     145
    128146            [1] => Array
    129147                (
    130                     [IDSubMovieFile] => 740
    131                     [MovieHash] => 1dab7c63893d0d81
    132                     [MovieByteSize] => 733919232
    133                     [MovieTimeMS] => 0
    134                     [MovieFrames] => 0
    135                     [IDSubtitleFile] => 964
    136                     [SubFileName] => Night Watch (Nochnoj Dozor) (2004) [2 of 2].srt
    137                     [SubActualCD] => 2
    138                     [SubSize] => 39074
    139                     [SubHash] => 021d7bf5480f97d8e0a28f0b0f03b28d
    140                     [IDSubtitle] => 771
    141                     [UserID] => 37047
    142                     [SubLanguageID] => eng
     148                    [IDSubMovieFile] => 82182
     149                    [MovieHash] => 09a2c497663259cb
     150                    [MovieByteSize] => 733589504
     151                    [MovieTimeMS] => 3165000
     152                    [IDSubtitleFile] => 1951690122
     153                    [SubFileName] => Night.Watch.2004.CD1.DVDRiP.XViD-FiCO.srt
     154                    [SubActualCD] => 1
     155                    [SubSize] => 27287
     156                    [SubHash] => fe106fe2368799bdc73271bb24ac6df7
     157                    [IDSubtitle] => 3144302
     158                    [UserID] => 367123
     159                    [SubLanguageID] => dut
    143160                    [SubFormat] => srt
    144161                    [SubSumCD] => 2
    145162                    [SubAuthorComment] =>
    146                     [SubAddDate] => 2005-05-23 07:47:04
     163                    [SubAddDate] => 2007-08-31 22:23:39
    147164                    [SubBad] => 0
    148165                    [SubRating] => 0.0
    149                     [SubDownloadsCnt] => 315
    150                     [MovieReleaseName] => Diamond
     166                    [SubDownloadsCnt] => 89
     167                    [MovieReleaseName] => Night Watch
    151168                    [IDMovie] => 516
    152169                    [IDMovieImdb] => 403358
     
    154171                    [MovieNameEng] => Night Watch
    155172                    [MovieYear] => 2004
    156                     [MovieImdbRating] => 6.3
    157                     [UserNickName] => onefox
    158                     [ISO639] => en
    159                     [LanguageName] => English
    160                     [SubDownloadLink] => http://www.opensubtitles.org/download/file/964.gz
    161                     [ZipDownloadLink] => http://www.opensubtitles.org/en/download/sub/771
     173                    [MovieImdbRating] => 0.0
     174                    [UserNickName] => gyoom
     175                    [ISO639] => nl
     176                    [LanguageName] => Dutch
     177                    [SubComments] => 0
     178                    [SubDownloadLink] => http://www.opensubtitles.org/en/download/file/1951690122.gz
     179                    [ZipDownloadLink] => http://www.opensubtitles.org/en/download/sub/3144302
    162180                )
    163181        )
     
    166184
    167185'''Fields explanation:'''
    168 All field are self-explained. Note: it returns array with two keys. In first key is array of arrays of found subtitles, in second key is number of seconds as usual.
    169 
    170 '''NOTE''' The field '!MovieFrames' isn't being send from the server. Make this field optional or just remove it.
     186All field are self-explained.
    171187
    172188----