', Page, LineNr + 1);
if LineNr > -1 then begin
LineNr := LineNr + 2;
Line := Page.GetString(LineNr);
EndPos := pos('', Line) - 1;
Value := Value + UTF8Decode(trim(Copy(Line, 0, EndPos)) + #13#10);
end;
end;
i:=i+1;
until ((EndPos=0) or (i>50));
HTMLRemoveTags(Value);
SetField(fieldActors, Value);
end;
//description
Line := '';
Value := '';
LineNr := FindLine('', Page, 0);
if LineNr > -1 then LineNr := FindLine('
', Page, LineNr + 1) + 1;
if LineNr > 0 then begin
repeat
LineNr := LineNr + 1;
Line := Page.GetString(LineNr);
Value2 := UTF8Decode(Line);
HTMLRemoveTags(Value2);
if Value <> '' then Value := Value + #13#10;
Value := Value + trim(Value2);
//debug: Showmessage('1:'+Line);
//debug: Showmessage('2:'+inttostr(LineNr));
//debug: Showmessage('2:'+inttostr(pos('', Line)));
until pos('', Line) > 0;
end;
//debug: Showmessage('3:'+Line);
SetField(fieldDescription, Value);
//director
SetField(fieldDirector, UTF8Decode(GetName(Page, 'rendez')));
//producer
SetField(fieldProducer, UTF8Decode(GetName(Page, 'producer')));
//writer
Value := UTF8Decode(GetName(Page, 'ĂrĂł:'));
SetField(fieldWriter, Value);
if Value = '' then
SetField(fieldWriter, UTF8Decode(GetName(Page, 'forgat')));
//composer
SetField(fieldComposer, UTF8Decode(GetName(Page, 'zene')));
//comments
CommentString := '';
//comments - writer
//Value := GetName(Page, 'író:');
//if Value<>'' then
// CommentString := CommentString+'Író: '+Value+#13#10;
//comments - screenplay
Value := UTF8Decode(GetName(Page, 'forgat'));
if Value<>'' then
CommentString := CommentString+'Forgatókönyvíró: '+Value+#13#10;
//comments - cameraman
Value := UTF8Decode(GetName(Page, 'operat'));
if Value<>'' then
CommentString := CommentString+'Operatőr: '+Value+#13#10;
//comments - ?? designer
Value := UTF8Decode(GetName(Page, 'díszlettervez'));
if Value<>'' then
CommentString := CommentString+'Díszlettervező: '+Value+#13#10;
//comments - costum designer
Value := UTF8Decode(GetName(Page, 'jelmeztervez'));
if Value<>'' then
CommentString := CommentString+'Jelmeztervező: '+Value+#13#10;
//comments - music
Value := UTF8Decode(GetName(Page, 'zene:'));
if Value<>'' then
CommentString := CommentString+'Zene: '+Value+#13#10;
//comments - executive producer
Value := UTF8Decode(GetName(Page, 'executive producer'));
if Value<>'' then
CommentString := CommentString+'Executive producer: '+Value+#13#10;
//comments - cutter
Value := UTF8Decode(GetName(Page, 'vágó:'));
if Value<>'' then
CommentString := CommentString+'Vágó: '+Value+#13#10;
//comments - ??
Value := UTF8Decode(GetName(Page, 'látványtervez'));
if Value<>'' then
CommentString := CommentString+'Látványtervező: '+Value+#13#10;
SetField(fieldComments, CommentString);
//picture
LineNr := FindLine('
', Line);
Value := UTF8Decode(copy(Line, BeginPos, EndPos - BeginPos));
GetPicture(Value); // False = do not store picture externally ; store it in the catalog file
end;
//Default language (if you want)
// case GetOption('Alapértelmezett nyelv') of
// 2: SetField(fieldLanguages, 'Magyar');
// 3: SetField(fieldLanguages, 'Angol');
// end;
end;
Function stringReverse(S : String): String;
Var
i : Integer;
Begin
Result := '';
For i := Length(S) DownTo 1 Do
Begin
Result := Result + Copy(S,i,1) ;
End;
End;
begin
if CheckVersion(3,5,0) then
begin
// trim the disk number
MovieName := GetField(fieldOriginalTitle);
MovieName := StringReplace(MovieName,' - cd1','');
MovieName := StringReplace(MovieName,' - CD1','');
MovieName := StringReplace(MovieName,'-CD1','');
MovieName := StringReplace(MovieName,'-cd1','');
if MovieName = '' then
MovieName := GetField(fieldTranslatedTitle);
if Input('Port.hu import', 'A keresendő film címe:', MovieName) then
begin
MovieName := StringReplace(MovieName, '&', 'xxampxx');
MovieName := UrlEncode(MovieName);
MovieName := StringReplace(MovieName, 'xxampxx', '%26');
//AnalyzePage('https://port.hu/kereso?type=all&q=' + MovieName);
AnalyzePage('https://port.hu/kereso?type=movie&q=' + MovieName);
end;
end else
ShowMessage('A szkript futtatásához szükség van az Ant Movie Catalog legújabb verziójára (De legalább a 3.5.0-esre) !');
end.