//SCRIPT_VERSION: 0.1.0.7 //DATE: 14-1-2013 //AUTHOR: Thiezar //UPDATES: Ivek23 //Some useful constants const //Script types stMovies = 0; stPeople = 1; stPoster = 2; //Script modes smSearch = 0; smNormal = 1; smCast = 2; smReview = 3; smCredits = 4; smPoster = 5; smFinished = 6; //Parse results prError = 0; prFinished = 1; prList = 2; prListImage = 3; prDownload = 4; //Download methods dmGET = 0; dmPOST = 1; //Prefix modes pmNone = 0; pmEnd = 1; pmBegin = 2; pmRemove = 3; //Movie fields mfURL = 0; mfTitle = 1; mfOrigTitle = 2; mfAka = 3; mfYear = 4; mfGenre = 5; mfCategory = 6; mfCountry = 7; mfStudio = 8; mfMPAA = 9; mfRating = 10; mfTags = 11; mfTagline = 12; mfDescription = 13; mfDuration = 14; mfFeatures = 15; //People fields pfURL = 0; pfName = 1; pfTransName = 2; pfAltNames = 3; pfBirthday = 4; pfBirthplace = 5; pfGenre = 6; pfBio = 7; pfDeathDate = 8; //Credits types ctActors = 0; ctDirectors = 1; ctWriters = 2; ctComposers = 3; ctProducers = 4; //Image types imgPosters = 0; imgScreenshots = 1; imgFrontcover = 2; imgDiscimage = 3; imgPhoto = 4; //Script data SCRIPT_VERSION = '0.1.0.7'; SCRIPT_NAME = 'mymovies.it'; SCRIPT_DESC = '[IT] Get movie information from MyMovies.it'; SCRIPT_LANG = $10; //Italian SCRIPT_TYPE = stMovies; BASE_URL = 'http://www.mymovies.it'; RATING_NAME = 'MyMovies'; SEARCH_STR = 'http://www.mymovies.it/database/ricerca/avanzata/?titolo=%s&titolo_orig=®ista=&attore=&id_genere=-1&nazione=&clausola1=-1&anno_prod=&clausola2=-1&stelle=-1&id_manif=-1&anno_manif=&disponib=-1&ordinamento=0&submit=Inizia+ricerca+%BB'; CODE_PAGE = 0; //Use 0 for Autodetect //OPTIONS GET_POSTER = True; GET_AWARDS = True; //Global variables var Mode : Byte; ExtraLinks : array [smCast..smPoster] of String; ELI : Integer; //Functions //--Obligatory functions function GetScriptVersion : String; begin Result := SCRIPT_VERSION; end; function GetScriptName : String; begin Result := SCRIPT_NAME; end; function GetScriptDesc : String; begin Result := SCRIPT_DESC; end; function GetBaseURL : AnsiString; begin Result := BASE_URL; end; function GetScriptLang: Cardinal; begin Result := SCRIPT_LANG; end; function GetScriptType : Byte; begin Result := SCRIPT_TYPE; end; function GetCurrentMode : Byte; begin Result := Mode; end; function GetDownloadURL : AnsiString; begin if (Mode = smSearch) then Result := SEARCH_STR else Result := ExtraLinks[Mode]; end; //--Optional functions function GetRatingName : String; begin Result := RATING_NAME; end; function GetCodePage : Cardinal; begin Result := CODE_PAGE; end; function GetDownloadMethod : Byte; begin Result := dmGET; end; function GetPrefixMode : Byte; begin Result := pmBegin; end; procedure ParseMovie(MovieURL : String; HTML : String); var curPos, EndPos : Integer; InfoStr : String; begin LogMessage('Parsing movie...'); curPos := Pos('