', all, i+1); if j>0 then s:=copy(all, i, j-i); end; if (s='') or (pos('No Matches.', all)>0) then //Movie not found else begin i:=pos('', s); while i>0 do begin s2:=copy(s, 1, i-1); j:=Pos('', s2); j:=MyPos('', s2, j+1); s2:=copy(s, j+5, length(s2)-j-4); j:=Pos('0) or (pos(' AKA ',UpperCase(title))=0) and (pos(UpperCase(NakedMovieTitle),UpperCase(title))=1) or (pos(UpperCase(NakedMovieTitle),UpperCase(title))=1) or (pos('"'+UpperCase(NakedMovieTitle)+'"',UpperCase(title))=1) then begin if (pos(Year,title)>0) or (pos(IntToStr(StrToInt(Year)+1),title)>0) or (pos(IntToStr(StrToInt(Year)-1),title)>0) then begin matches_count:=matches_count+1; if (imdb_code='') then imdb_code:=ParseString(s3, '', s); end; end; if (matches_count>1) then imdb_code:=''; end; end; // imdb_code already known or found by imdb search : retrieve IMDB infos if (imdb_code>'') then begin imdb_rating:=0; mpaa:=''; mpaa_rating:=''; url:=format('http://www.imdb.com/title/tt%s', [imdb_code]); all:=DownloadURL(url); if (all<>'-1') then begin //imdb rating imdb_rating:=0; i:=pos('
', all, i+1); if j>0 then s:=copy(all, i, j-i); end; if (s='') or (pos('No Matches.', all)>0) then //Movie not found else begin i:=pos('', s); while i>0 do begin s2:=copy(s, 1, i-1); j:=Pos('', s2); j:=MyPos('', s2, j+1); s2:=copy(s, j+5, length(s2)-j-4); j:=Pos('0) or (pos(' AKA ',UpperCase(title))=0) and (pos(UpperCase(NakedMovieTitle),UpperCase(title))=1) or (pos(UpperCase(NakedMovieTitle),UpperCase(title))=1) or (pos('"'+UpperCase(NakedMovieTitle)+'"',UpperCase(title))=1) then begin if (pos(Year,title)>0) or (pos(IntToStr(StrToInt(Year)+1),title)>0) or (pos(IntToStr(StrToInt(Year)-1),title)>0) then begin matches_count:=matches_count+1; if (imdb_code='') then imdb_code:=ParseString(s3, '', s); end; end; if (matches_count>1) then imdb_code:=''; end; end; // imdb_code already known or found by imdb search : retrieve IMDB infos if (imdb_code>'') then begin imdb_rating:=0; mpaa:=''; mpaa_rating:=''; url:=format('http://www.imdb.com/title/tt%s', [imdb_code]); all:=DownloadURL(url); if (all<>'-1') then begin //imdb rating imdb_rating:=0; i:=pos('