Changes between Version 44 and Version 45 of XMLRPC


Ignore:
Timestamp:
Jan 24, 2012, 5:39:17 AM (12 years ago)
Author:
os
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • XMLRPC

    v44 v45  
    8686
    8787== !SearchSubtitles ==
    88 '''array !SearchSubtitles( $token, array(array('sublanguageid' => $sublanguageid, 'moviehash' => $moviehash, 'moviebytesize' => $moviesize, ''imdbid => $imdbid'', ''query'' => 'movie name' ),array(...)))'''
    89 
    90 Returns 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'''array !SearchSubtitles( $token, array(array('sublanguageid' => $sublanguageid, 'moviehash' => $moviehash, 'moviebytesize' => $moviesize, ''imdbid => $imdbid'', ''query'' => 'movie name', "season" => 'season number', "episode" => 'episode number' ),array(...)))'''
     89
     90Returns 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').
    9191
    9292If 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:
     
    104104 * Some data (IDSubMovieFile, !MovieHash, !MovieByteSize, MovieTimeMS) are set to 0, when searching by imdbid or query
    105105 * Max results is set to 500 found items in total
     106 * Season and Episode are not mandatory, when using query/imdb searching
    106107 * For perfect matches use moviehash/moviebytesize searching, for movie matches use imdbid searching, if you can not use any of them, use fulltext search
    107108 * 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
    108109 * !MatchedBy can be: moviehash, imdbid, fulltext (so you know from where results comes from)
    109110
    110 Example output:
    111 {{{
    112     [data] => Array
     111Tip: you can combine your searches array as you want, so things like
     112{{{
     113array('query' => 'south park', 'season' => 1, 'episode' => 1,),
     114array('query' => 'beverly hills blondes'),
     115array('query' => 'matrix', 'sublanguageid' => 'cze,slo'),
     116array('moviehash' => '18379ac9af039390', 'moviebytesize' => 366876694)
     117}}}
     118are possible :)
     119
     120Example output:
     121{{{
     122     [data] => Array
    113123        (
    114124            [0] => Array
    115125                (
    116126                    [MatchedBy] => moviehash
    117                     [IDSubMovieFile] => 82181
    118                     [MovieHash] => 09a2c497663259cb
    119                     [MovieByteSize] => 733589504
    120                     [MovieTimeMS] => 3165000
    121                     [IDSubtitleFile] => 1951690121
    122                     [SubFileName] => Night.Watch.2004.CD1.DVDRiP.XViD-FiCO.srt
     127                    [IDSubMovieFile] => 865
     128                    [MovieHash] => d745cd88e9798509
     129                    [MovieByteSize] => 734058496
     130                    [MovieTimeMS] => 0
     131                    [IDSubtitleFile] => 1118
     132                    [SubFileName] => Al sur de Granada (SPA).srt
    123133                    [SubActualCD] => 1
    124                     [SubSize] => 27287
    125                     [SubHash] => fe106fe2368799bdc73271bb24ac6df7
    126                     [IDSubtitle] => 3144301
    127                     [UserID] => 367123
    128                     [SubLanguageID] => dut
     134                    [SubSize] => 15019
     135                    [SubHash] => 0cb51bf4a5266a9aee42a2d8c7ab6793
     136                    [IDSubtitle] => 905
     137                    [UserID] => 0
     138                    [SubLanguageID] => spa
    129139                    [SubFormat] => srt
    130140                    [SubSumCD] => 1
    131141                    [SubAuthorComment] =>
    132                     [SubAddDate] => 2007-08-31 22:18:20
    133                     [SubBad] => 0
    134                     [SubRating] => 0.0
    135                     [SubDownloadsCnt] => 253
    136                     [MovieReleaseName] => Night Watch
    137                     [IDMovie] => 516
    138                     [IDMovieImdb] => 403358
    139                     [MovieName] => Nochnoy dozor
    140                     [MovieNameEng] => Night Watch
    141                     [MovieYear] => 2004
    142                     [MovieImdbRating] => 0.0
    143                     [UserNickName] => gyoom
    144                     [ISO639] => nl
    145                     [LanguageName] => Dutch
    146                     [SubComments] => 0
    147                     [SubDownloadLink] => http://www.opensubtitles.org/en/download/file/1951690121.gz
    148                     [ZipDownloadLink] => http://www.opensubtitles.org/en/download/sub/3144301
    149                     [SubtitlesLink] => http://www.opensubtitles.net/en/subtitles/3144301/nochnoy-dozor-nl
     142                    [SubAddDate] => 2005-06-15 20:05:35
     143                    [SubBad] => 1
     144                    [SubRating] => 4.5
     145                    [SubDownloadsCnt] => 216
     146                    [MovieReleaseName] => ss
     147                    [IDMovie] => 11517
     148                    [IDMovieImdb] => 349076
     149                    [MovieName] => Al sur de Granada
     150                    [MovieNameEng] => South from Granada
     151                    [MovieYear] => 2003
     152                    [MovieImdbRating] => 6.4
     153                    [SubFeatured] => 0
     154                    [UserNickName] =>
     155                    [ISO639] => es
     156                    [LanguageName] => Spanish
     157                    [SubComments] => 1
     158                    [SubHearingImpaired] => 0
     159                    [UserRank] =>
     160                    [SeriesSeason] =>
     161                    [SeriesEpisode] =>
     162                    [MovieKind] => movie
     163                    [QueryParameters] => Array
     164                        (
     165                            [sublanguageid] => all
     166                            [moviehash] => d745cd88e9798509
     167                            [moviebytesize] => 734058496
     168                        )
     169
     170                    [QueryNumber] => 0
     171                    [SubDownloadLink] => http://dl.opensubtitles.local/en/download/filead/1118.gz
     172                    [ZipDownloadLink] => http://dl.opensubtitles.local/en/download/subad/905
     173                    [SubtitlesLink] => http://www.opensubtitles.local/en/subtitles/905/al-sur-de-granada-es
    150174                )
    151175
    152176            [1] => Array
    153                 (
    154                     [MatchedBy] => moviehash
    155                     [IDSubMovieFile] => 82182
    156                     [MovieHash] => 09a2c497663259cb
    157                     [MovieByteSize] => 733589504
    158                     [MovieTimeMS] => 3165000
    159                     [IDSubtitleFile] => 1951690122
    160                     [SubFileName] => Night.Watch.2004.CD1.DVDRiP.XViD-FiCO.srt
    161                     [SubActualCD] => 1
    162                     [SubSize] => 27287
    163                     [SubHash] => fe106fe2368799bdc73271bb24ac6df7
    164                     [IDSubtitle] => 3144302
    165                     [UserID] => 367123
    166                     [SubLanguageID] => dut
    167                     [SubFormat] => srt
    168                     [SubSumCD] => 2
    169                     [SubAuthorComment] =>
    170                     [SubAddDate] => 2007-08-31 22:23:39
    171                     [SubBad] => 0
    172                     [SubRating] => 0.0
    173                     [SubDownloadsCnt] => 89
    174                     [MovieReleaseName] => Night Watch
    175                     [IDMovie] => 516
    176                     [IDMovieImdb] => 403358
    177                     [MovieName] => Nochnoy dozor
    178                     [MovieNameEng] => Night Watch
    179                     [MovieYear] => 2004
    180                     [MovieImdbRating] => 0.0
    181                     [UserNickName] => gyoom
    182                     [ISO639] => nl
    183                     [LanguageName] => Dutch
    184                     [SubComments] => 0
    185                     [SubDownloadLink] => http://www.opensubtitles.org/en/download/file/1951690122.gz
    186                     [ZipDownloadLink] => http://www.opensubtitles.org/en/download/sub/3144302
    187                     [SubtitlesLink] => http://www.opensubtitles.net/en/subtitles/3144302/nochnoy-dozor-nl
    188                 )
    189177...
    190178}}}
    191179
    192180'''Fields explanation:'''
    193 All field are self-explained.
     181QueryNumber is array number in queries sent, starts from 0.
     182Other: All field are self-explained.
    194183
    195184----
     
    249238                    [MovieName] => Planet of the Apes
    250239                    [MovieYear] => 2001
    251                 )
     240                    [MovieKind] => movie
     241                    [SeriesSeason] =>
     242                    [SeriesEpisode] => 
     243               )
    252244
    253245            [ae34f157eefc093c] => Array
     
    257249                    [MovieName] => Ghost Ship
    258250                    [MovieYear] => 2002
     251                    [MovieKind] => movie
     252                    [SeriesSeason] =>
     253                    [SeriesEpisode] =>
    259254                )
    260255
     
    280275'''array CheckMovieHash2( $token, array($moviehash, $moviehash, ...) )'''
    281276
    282 This method returns matching !MovieImdbID, !MovieName, !MovieYear, if available for each $moviehash, always sorted by !SeenCount DESC. Read more about [wiki:MovieIdentification Movie Identification].
     277This method returns matching !MovieImdbID, !MovieName, !MovieYear, !SeriesSeason, !SeriesEpisode, !MovieKind if available for each $moviehash, always sorted by !SeenCount DESC. Read more about [wiki:MovieIdentification Movie Identification].
    283278
    284279Example output:
     
    294289                            [MovieImdbID] => 103644
    295290                            [MovieName] => Alien³
     291                            [MovieKind] => movie
     292                            [SeriesSeason] =>
     293                            [SeriesEpisode] => 
    296294                            [MovieYear] => 1992
    297295                            [SeenCount] => 48
     
    303301                            [MovieImdbID] => 133093
    304302                            [MovieName] => The Matrix
     303                            [MovieKind] => movie
     304                            [SeriesSeason] =>
     305                            [SeriesEpisode] =>
    305306                            [MovieYear] => 1999
    306307                            [SeenCount] => 5
     
    314315                        (
    315316                            [MovieHash] => 53fc6fe84ad5ee31
    316                             [MovieImdbID] => 813715
    317                             [MovieName] => "Heroes"
     317                            [MovieImdbID] => 0813715
     318                            [MovieName] => Heroes
    318319                            [MovieYear] => 2006
     320                            [MovieKind] => tv series
     321                            [SeriesSeason] =>
     322                            [SeriesEpisode] =>
    319323                            [SeenCount] => 427
    320324                        )
     
    324328                            [MovieHash] => 53fc6fe84ad5ee31
    325329                            [MovieImdbID] => 1185913
    326                             [MovieName] => "Heroes" One of Us, One of Them
     330                            [MovieName] => "Heroes" Chapter Three 'One of Us, One of Them'
    327331                            [MovieYear] => 2008
     332                            [MovieKind] => episode
     333                            [SeriesSeason] => 3
     334                            [SeriesEpisode] => 3
    328335                            [SeenCount] => 260
    329336                        )
    330 
    331337                )
    332338        ...