Another improvement to the IMDB (large pic) script

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
antp
Site Admin
Posts: 9642
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: I'll try it out.

Post by antp »

booker wrote:It would be nice if there was a feature to run this import script for each entry to great the information from imdb etc.
:??: just select several movies in the list, the go to Tools -> Scripting
Guest

Post by Guest »

This fix you did for the pictures worked. I can look up the information from the net using the script and get their pictures and they don't clobber each other and I con't have to save after each update of a movie's picture.

I do have a suggestion on a tweak of the batch processing. When I enter a new movie into the catalog I put it in as the original title. So after I've added a few movies i run one of the scripts to get the information for all the new movies i've entered. Each time a lookup is done it comes up and wants me to verify the original name and I click ok, if it finds a match then it moves on to the next unless it finds a match for multiples and then i have to pick. Can you make it an option to turn of that initial verify of the movie name so that the only time you interact in the update is when it asks you it found multiple matches. Of course at this point you want to display the original titile it did the search on also since we are bypassing that.

Booker.
antp
Site Admin
Posts: 9642
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

This question comes so often, I think it will be an option in the next version since currently it requires to modify the script :D

Here's what I answered to last person that asked me that by mail:
Just go on the "Editor" tab of the script window, then at the bottom of the script you find something like :

Code: Select all

    if Input('IMDb Import', 'Enter the title of the movie:', MovieName) then
    begin
      AnalyzePage('http://us.imdb.com/Tsearch?title='+UrlEncode(MovieName));
    end;
sometimes there is also an old line that begins with "//" (you can delete this line)

Just replace this block by a simple call to AnalyzePage :

Code: Select all

    AnalyzePage('http://us.imdb.com/Tsearch?title='+UrlEncode(MovieName));
(remove the "if ... then", "begin" and the "end" line)


If you prefer to keep the Window asking you if the title is empty, you can do this :

Code: Select all

    if MovieName <> '' then
      AnalyzePage('http://us.imdb.com/Tsearch?title='+UrlEncode(MovieName))
    else
    if Input('IMDb Import', 'Enter the title of the movie:', MovieName) then
      AnalyzePage('http://us.imdb.com/Tsearch?title='+UrlEncode(MovieName));
lboregard

minor correction

Post by lboregard »

first of all, great work by ork and trekkie ... this has developed into a very robust script ....

i did find that sometimes it would bring a small pic even if the larger one was available, and traced it to a missing semi-colon .. here it is:

BEFORE

Code: Select all

      if (LineNr > -1 ) then
      begin
        LineNr := FindLine('src="http://images.amazon.com/images/P/',AmazonPage, LineNr);
        if not PickTreeSelected then
          TitleLine:= FindLine('/exec/obidos/ASIN/',AmazonPage, 0);
        if (LineNr > TitleLine) then
          LineNr:=-1
        if LineNr > -1 then
        begin
          Line := AmazonPage.GetString(LineNr);
          BeginPos := Pos('src="http://images.amazon.com/images/P/', Line) + 4;
          Delete(Line, 1, BeginPos);
          EndPos := Pos('"', Line);
          Value := Copy(Line, 1, EndPos - 1);
          Value := StringReplace(Value, 'TZZZZZZZ', 'LZZZZZZZ');
          Value := StringReplace(Value, 'THUMBZZZ', 'LZZZZZZZ');
          GetPicture(Value, ExternalPictures);
          FoundOnAmazon := True;
        end;
      end;
AFTER

Code: Select all

      if (LineNr > -1 ) then
      begin
        LineNr := FindLine('src="http://images.amazon.com/images/P/',AmazonPage, LineNr);
        if not PickTreeSelected then
          TitleLine:= FindLine('/exec/obidos/ASIN/',AmazonPage, 0);
        if (LineNr > TitleLine) then
          LineNr:=-1[b];[/b]
        if LineNr > -1 then
        begin
          Line := AmazonPage.GetString(LineNr);
          BeginPos := Pos('src="http://images.amazon.com/images/P/', Line) + 4;
          Delete(Line, 1, BeginPos);
          EndPos := Pos('"', Line);
          Value := Copy(Line, 1, EndPos - 1);
          Value := StringReplace(Value, 'TZZZZZZZ', 'LZZZZZZZ');
          Value := StringReplace(Value, 'THUMBZZZ', 'LZZZZZZZ');
          GetPicture(Value, ExternalPictures);
          FoundOnAmazon := True;
        end;
      end;
i've put the semi-colon in bold (i hope it shows up as such).

nice program antoine

Lance Boregard
antp
Site Admin
Posts: 9642
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

In the current version of the script (the one that comes with the program) there is already a ";" there...
kinetix
Posts: 32
Joined: 2003-02-23 08:03:44
Location: Sweden

Post by kinetix »

I've asked this before and got an answer... But now the answer has dissapeared from this topic (probably after 'the cleanup')...

The question was, and once again is, how do I modify the script so I get ALL actors and not just a few...?


I was forced the format my harddrive, and accidently left the IMDb-script on that specific drive... :shaking:
antp
Site Admin
Posts: 9642
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

:??: by default it gets all the actors that are displayed on the main movie info page
kinetix
Posts: 32
Joined: 2003-02-23 08:03:44
Location: Sweden

Post by kinetix »

ooookeeeejjjj.........
I just copied This script, and it wont take all actors...

Also, not with the script that comes with the latest update (IMDb large pic)....

What am I doing wrong :??:
Post Reply