Posted: 2007-03-27 13:41:18
It works now.
Thank you for the quick help.
Thank you for the quick help.
Code: Select all
if (GetOption('CommentType') = 2) then
SetField(fieldComments, #13#10);
Code: Select all
if (GetOption('CommentType') = 2) then
SetField(fieldComments, '');
Code: Select all
case GetOption('Trivia') of
1:
begin
if GetField(fieldDescription) <> '' then
Value := GetField(fieldDescription) + #13#10 + #13#10 + 'IMDB TRIVIA: ' + Value
else
Value := 'IMDB ' + Value2 + ': ' + Value; // <-- changing this line
SetField(fieldDescription, Value);
end;
2:
begin
if GetField(fieldComments) <> '' then
Value := GetField(fieldComments) + #13#10 + #13#10 + 'IMDB TRIVIA: ' + Value
else
Value := 'IMDB ' + Value2 + ': ' + Value; // <-- changing this line
SetField(fieldComments, Value);
end;
Code: Select all
case GetOption('Trivia') of
1:
begin
if GetField(fieldDescription) <> '' then
Value := GetField(fieldDescription) + #13#10 + #13#10 + 'IMDB TRIVIA: ' + Value
else
Value := 'IMDB TRIVIA: ' + Value; // <-- changed this line
SetField(fieldDescription, Value);
end;
2:
begin
if GetField(fieldComments) <> '' then
Value := GetField(fieldComments) + #13#10 + #13#10 + 'IMDB TRIVIA: ' + Value
else
Value := 'IMDB TRIVIA: ' + Value; // <-- changed this line
SetField(fieldComments, Value);
end;
Code: Select all
Value := StringReplace(Value, '>>> WARNING: Here Be Spoilers <<<', #13#10 + '>>> WARNING: Here Be Spoilers <<< ');
Code: Select all
Value := StringReplace(Value, '<li>', #13#10 + '- ');
Value := StringReplace(Value, '>>> WARNING: Here Be Spoilers <<<', #13#10 + '>>> WARNING: Here Be Spoilers <<< ');
HTMLRemoveTags(Value);
HTMLDecode(Value);
case GetOption('Trivia') of
Code: Select all
Goofs=2|0|0=Do not import goofs|1=Import goofs to Description field, after the summary|2=Import goofs to Comments field, after the comments
MovieConnections=2|0|0=Do not import movie connections|1=Import movie connections to Description field, after the summary|2=Import movie connections to Comments field, after the comments
CrazyCredits=2|0|0=Do not import crazy credits|1=Import crazy credits to Description field, after the summary|2=Import crazy credits to Comments field, after the comments
Code: Select all
// Awards
if (GetOption('Awards') > 0) then
begin
ImportAwards();
end;
// Goofs
if (GetOption('Goofs') > 0) then
begin
ImportGoofs();
end;
// Crazy Credits
if (GetOption('CrazyCredits') > 0) then
begin
ImportCrazyCredits();
end;
// Movie Connections
if (GetOption('MovieConnections') > 0) then
begin
ImportConnections();
end;
Code: Select all
// Procedure - ImportGoofs
procedure ImportGoofs;
var
FullValue, Value : string;
begin
sleep(50);
Value := MovieUrl;
FullValue := GetPage(Value+'/goofs');
Value := TextBetween(FullValue, '<ul class="trivia">', '<div align="center"> <!--');
if Value <> '' then
begin
Value := StringReplace(Value, #13#10, '');
while Pos(' ', Value) > 0 do
Value := StringReplace(Value, ' ', '');
while Pos('<li> ', Value) > 0 do
Value := StringReplace(Value, '<li> ', '<li>');
Value := StringReplace(Value, '<li>', #13#10 + '- ');
Value := StringReplace(Value, '>>> WARNING: Here Be Spoilers <<<', #13#10 + '>>> WARNING: Here Be Spoilers <<< ');
HTMLRemoveTags(Value);
HTMLDecode(Value);
case GetOption('Goofs') of
1:
begin
if GetField(fieldDescription) <> '' then
Value := GetField(fieldDescription) + #13#10 + #13#10 + 'IMDB GOOFS: ' + Value
else
Value := 'IMDB GOOFS: ' + Value;
SetField(fieldDescription, Value);
end;
2:
begin
if GetField(fieldComments) <> '' then
Value := GetField(fieldComments) + #13#10 + #13#10 + 'IMDB GOOFS: ' + Value
else
Value := 'IMDB GOOFS: ' + Value;
SetField(fieldComments, Value);
end;
end;
end;
end;
// Procedure - CrazyCredits
procedure ImportCrazyCredits;
var
FullValue, Value : string;
begin
sleep(50);
Value := MovieUrl;
FullValue := GetPage(Value+'/crazycredits');
Value := TextBetween(FullValue, '<pre>', '</pre>');
if length(Value) > 4 then
begin
Value:= StringReplace(Value, #13#10, ' ');
while Pos(' ', Value) > 0 do
Value := StringReplace(Value, ' ', '');
Value := StringReplace(Value, '<br><br>', #13#10 + '- ');
HTMLRemoveTags(Value);
HTMLDecode(Value);
Value := '- ' + FullTrim(Value);
case GetOption('CrazyCredits') of
1:
begin
if GetField(fieldDescription) <> '' then
Value := GetField(fieldDescription) + #13#10 + #13#10 + 'IMDB CRAZY CREDITS: ' + #13#10 + Value
else
Value := 'IMDB CRAZY CREDITS: ' + #13#10 + Value;
SetField(fieldDescription, Value);
end;
2:
begin
if GetField(fieldComments) <> '' then
Value := GetField(fieldComments) + #13#10 + #13#10 + 'IMDB CRAZY CREDITS: ' + #13#10 + Value
else
Value := 'IMDB CRAZY CREDITS: ' + #13#10 + Value;
SetField(fieldComments, Value);
end;
end;
end;
end;
// Procedure - ImportConnections
procedure ImportConnections;
var
FullValue, Value : string;
begin
sleep(50);
Value := MovieUrl;
FullValue := GetPage(Value+'/movieconnections');
Value := TextBetween(FullValue, '<div id="tn15content">', '<div align="center"> <!--');
if Value <> '' then
begin
Value := StringReplace(Value, #13#10, '');
while Pos(' ', Value) > 0 do
Value := StringReplace(Value, ' ', '');
Value := StringReplace(Value, '<h5>', #13#10);
Value := StringReplace(Value, '</h5>', ':' + #13#10);
Value := StringReplace(Value, '<br/>', #13#10);
Value := StringReplace(Value, ' - ', '- ');
HTMLRemoveTags(Value);
HTMLDecode(Value);
Value := FullTrim(Value);
case GetOption('MovieConnections') of
1:
begin
if GetField(fieldDescription) <> '' then
Value := GetField(fieldDescription) + #13#10 + #13#10 + 'IMDB MOVIE CONNECTIONS: ' + #13#10 + Value
else
Value := 'IMDB MOVIE CONNECTIONS: ' + #13#10 + Value;
SetField(fieldDescription, Value);
end;
2:
begin
if GetField(fieldComments) <> '' then
Value := GetField(fieldComments) + #13#10 + #13#10 + 'IMDB MOVIE CONNECTIONS: ' + #13#10 + Value
else
Value := 'IMDB MOVIE CONNECTIONS: ' + #13#10 + Value;
SetField(fieldComments, Value);
end;
end;
end;
end;