IMDB - improve search precision

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.
Post Reply
rs232
Posts: 107
Joined: 2012-05-09 21:57:22

IMDB - improve search precision

Post by rs232 »

Two questions:

1) How do I go modifying the IMDB script to add the year (since it's available in the Year field) just after after the title?

e.g.

Avatar
=
Avatar 2009

2) Can the batch mode be modified to save and proceed automatically to the next record if 1 and only 1 result is found, but stopping and prompting to select the correct title in case of multiple results found?

Thanks!
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

1. Add the year where? Into the "original title" field?

2. If there is only one result found the script could skipt the prompt for selecting it indeed, that's just some tweaking to do in the script
rs232
Posts: 107
Joined: 2012-05-09 21:57:22

Post by rs232 »

In the pop up gui when prompted to specify the title.

e.g. let's say I have Avatar in the title I select IMDB, it will open a pop up with Avatar in it.

I was wondering if it's possible to have "Avatar 2009" filled in automatically when opening the pop up
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

So you mean when updating movie info, when title & year were already filled?

Near the bottom of the script there is a line:

Code: Select all

      if not Input('IMDB Import', 'Enter the title or the IMDB URL of the movie:', MovieName) then
change it to

Code: Select all

      if not Input('IMDB Import', 'Enter the title or the IMDB URL of the movie:', MovieName + ' ' + GetField(fieldYear)) then
and it should work
rs232
Posts: 107
Joined: 2012-05-09 21:57:22

Post by rs232 »

Thanks for that! i have actually worked out this version of mine:

if MovieYear = '' then
MovieYear := GetField(fieldYear);
MovieName := MovieName + ' ' + '(' + MovieYear + ')';
if GetOption('BatchMode') = 0 then
begin
if not Input('IMDB Import', 'Enter the title or the IMDB URL of the movie:', MovieName) then
Exit;
end

I did add the rounded brackets as after few tests I figured out that IMDB treat the content as a date.

e.g.

Search for (in order):

phoenix
phoenix 2014
phoenix (2014)

and spot the differences.

If I can add something here. Can we have an option into the IMDB script that consider/ignore "short movies" and "series"?
rs232
Posts: 107
Joined: 2012-05-09 21:57:22

Post by rs232 »

Answering my own last point:

Using:

PopularTitleSearchURL = 'http://www.imdb.com/find?s=tt&ttype=ft&q=';

Will look for movies only.

The next evolution would be: do look for Movies first, if not found attempt "TV Movie", but I guess this would need substantial rewriting (may be not?)
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

rs232 wrote: if MovieYear = '' then
MovieYear := GetField(fieldYear);
That won't work correctly if you run the script on more than one movie.
There is no reason to test the value of MovieYear, you can overwrite it each time.
Post Reply