237 | | [seconds] => 0.046 |
238 | | }}} |
239 | | |
240 | | '''Fields explanation:''' |
241 | | Array in data contains $moviehash => array() |
| 243 | |
| 244 | [seconds] => 0.133 |
| 245 | }}} |
| 246 | |
| 247 | '''Fields explanation:''' |
| 248 | Array in data contains $moviehash => array(), even for unmatched moviehashes. |
| 249 | |
| 250 | ---- |
| 251 | |
| 252 | == !CheckMovieHash2 == |
| 253 | '''array !CheckMovieHash2( $token, array($moviehash, $moviehash, ...) )''' |
| 254 | |
| 255 | This method returns matching !MovieImdbID, !MovieName, !MovieYear, if available for each $moviehash, always sorted by !SeenCount DESC. |
| 256 | |
| 257 | Example output: |
| 258 | {{{ |
| 259 | [status] => 200 OK |
| 260 | [data] => Array |
| 261 | ( |
| 262 | [3b2ae156d8c11f7a] => Array |
| 263 | ( |
| 264 | [0] => Array |
| 265 | ( |
| 266 | [MovieHash] => 3b2ae156d8c11f7a |
| 267 | [MovieImdbID] => 103644 |
| 268 | [MovieName] => Alien³ |
| 269 | [MovieYear] => 1992 |
| 270 | [SeenCount] => 48 |
| 271 | ) |
| 272 | |
| 273 | [1] => Array |
| 274 | ( |
| 275 | [MovieHash] => 3b2ae156d8c11f7a |
| 276 | [MovieImdbID] => 133093 |
| 277 | [MovieName] => The Matrix |
| 278 | [MovieYear] => 1999 |
| 279 | [SeenCount] => 5 |
| 280 | ) |
| 281 | |
| 282 | ) |
| 283 | |
| 284 | [53fc6fe84ad5ee31] => Array |
| 285 | ( |
| 286 | [0] => Array |
| 287 | ( |
| 288 | [MovieHash] => 53fc6fe84ad5ee31 |
| 289 | [MovieImdbID] => 813715 |
| 290 | [MovieName] => "Heroes" |
| 291 | [MovieYear] => 2006 |
| 292 | [SeenCount] => 427 |
| 293 | ) |
| 294 | |
| 295 | [1] => Array |
| 296 | ( |
| 297 | [MovieHash] => 53fc6fe84ad5ee31 |
| 298 | [MovieImdbID] => 1185913 |
| 299 | [MovieName] => "Heroes" One of Us, One of Them |
| 300 | [MovieYear] => 2008 |
| 301 | [SeenCount] => 260 |
| 302 | ) |
| 303 | |
| 304 | ) |
| 305 | ... |
| 306 | }}} |
| 307 | |
| 308 | '''Fields explanation:''' |
| 309 | Array in data contains $moviehash => array(), '''only''' for matched moviehashes. |
| 310 | |
| 311 | ---- |
| 312 | |
| 313 | == !InsertMovieHash == |
| 314 | '''array !InsertMovieHash( $token, array( array('moviehash' => $moviehash, 'moviebytesize' => $moviebytesize, 'imdbid' => $imdbid, 'movietimems' => $movietimems, 'moviefps' => $moviefps, 'moviefilename' => $moviefilename), array(...) ) )''' |
| 315 | |
| 316 | Inserts or updates data to tables, which are used for !CheckMovieHash() and !CheckMovieHash2(). Requested parameters are: '''moviehash, moviebytesize, imdbid''', all rest parameters are '''optional''', but preferred to supply them. Before accepting moviehashes, each moviehash is checked against log table if user doesn't already send it. |
| 317 | |
| 318 | Example output: |
| 319 | {{{ |
| 320 | [status] => 200 OK |
| 321 | [data] => Array |
| 322 | ( |
| 323 | [accepted_moviehashes] => Array |
| 324 | ( |
| 325 | [0] => 53fc6fe84ad5ee31 |
| 326 | [1] => 3b2ae156d8c11f7a |
| 327 | ) |
| 328 | |
| 329 | [new_imdbs] => Array |
| 330 | ( |
| 331 | ) |
| 332 | |
| 333 | ) |
| 334 | |
| 335 | [seconds] => 0.014 |
| 336 | }}} |
| 337 | |
| 338 | '''Fields explanation:''' |
| 339 | accepted_moviehashes - hashes, which was inserted or updated, new_imdbs - imdb ids need to download from imdb.com |