[[PageOutline(2, Navigation)]] = Movie Identification = == Introduction == No doubt there is requests for movie identification service - with submitting moviehash you can get IMDBID with some details. Opensubtitles database was designed to support this, but only with uploaded subtitles (that means, somebody upload subtitles with moviehash and according that we can get IMDBID). Now we support "full" movie identification, that means you can insert to database moviehashes without subtitles. It can be used in media players, scripts, etc...you can read more about this in [http://forum.opensubtitles.org/viewtopic.php?p=5324 forum] == Work flow == * Recursive scan movie folder, try to extract imdbid from *.nfo files * [wiki:XMLRPC#LogIn LogIn()] first (anonymous user is OK) * For [wiki:DevReadFirst#Videofilesextensions movies] with detected imdbid call [wiki:XMLRPC#InsertMovieHash InsertMovieHash()] * For movies with no imdbid call [wiki:XMLRPC#CheckMovieHash2 CheckMovieHash2()] or [wiki:XMLRPC#CheckMovieHash CheckMovieHash()] * !CheckMovieHash2 can return more imdbid matches per movie, when user selects one, call [wiki:XMLRPC#InsertMovieHash InsertMovieHash()] * If you get no results, you can call [wiki:XMLRPC#SearchMoviesOnIMDB SearchMoviesOnIMDB()] (or your own imdb search), after user selects right movie call [wiki:XMLRPC#InsertMovieHash InsertMovieHash()] pretty simple, isn't it ? :) If you can, avoid send duplicate hashes in !InsertMovieHash, but if you can not, it is OK, we are removing duplicates on server side. == How to extract imdbid from *.nfo files == * First read about common [wiki:DevReadFirst#Gettingvideoinformation structure of video files] * Scan for one *.nfo file in firectory, extract IMDBID using this regexp: {{{ /imdb\.[^\/]+\/title\/tt(\d+)/i }}} * Common links are: * http://www.imdb.com/title/tt0783233/ * http://imdb.com/title/tt0426931/ * http://www.us.imdb.com/title/tt0421082/ == Notes == There should be nice, if your application supports [wiki:DevReadFirst#RARsupport RAR archives].