Another improvement to the IMDB (large pic) script
Hey, thx. Great improvements!
Now there is one more thing to resolve: sometimes the script finds a picture, but it is the picture of a different movie.
Take "Song jia huang chao" as an example. The imdb link takes you to an Amazon page where the movie is found, but no picture available. However, Amazon proposes 'closely related' movies and the script takes the first picture of the related movies! What it should do is return empty because this movie doesn't have a picture.
I would appreciate your efforts to look into this.
Now there is one more thing to resolve: sometimes the script finds a picture, but it is the picture of a different movie.
Take "Song jia huang chao" as an example. The imdb link takes you to an Amazon page where the movie is found, but no picture available. However, Amazon proposes 'closely related' movies and the script takes the first picture of the related movies! What it should do is return empty because this movie doesn't have a picture.
I would appreciate your efforts to look into this.
Another improvement to the IMDB (large pic) script
Ork Silly me .you're wright.
jwm
Ok . Here is the latest code. only AnalyzeMoviePage section
jwm
Ok . Here is the latest code. only AnalyzeMoviePage section
Code: Select all
Seems like the "Made for video" and "TV series" sections should be swapped.
I think all IMDb scripts have this error.
I think all IMDb scripts have this error.
Code: Select all
LineNr := FindLine('<H2><A NAME="vid">Made for video</A></H2>', Page, LineNr);
if LineNr > -1 then
begin
PickTreeAdd('Made for video', '');
AddMoviesTitles(Page, LineNr);
end;
LineNr := FindLine('<H2><A NAME="tvs">TV series</A></H2>', Page, LineNr);
if LineNr > -1 then
begin
PickTreeAdd('TV Series', '');
AddMoviesTitles(Page, LineNr);
end;
Seems we are slowly getting there. A lot of the previous problems have been solved. However, there are still some movies that don't give a proper picture. Examples:
"Dances with wolves" has large picture available, but the script returns empty.
"Arlington Road" has a small picture available, but the script returns empty.
"The prince of Egypt" has small pictures available, and also a large for DTS. The script returns empty.
"Evolver" has a small picture available, but the script returns empty.
"Last to surrender" has a small picture available, but the script returns empty.
"Kansas City", idem.
A lot of my movies return a small picture, while there is a large picture available in VHS. I am planning to experiment a bit with importing VHS picture first, and if not found try DVD. (the script now does DVD first, and then VHS).
In the meantime I have made the following changes to the script:
- truncated the year, so that years like "1998/I" also get imported;
- changed category import to show all categories, instead of only the first one;
- added a picklist that allows you to choose the Translated Title from all available 'also known as' titles, or leave it empty; by setting ImportAllAKATitles := True it will bypass the picklist and import all available AKA titles;
- changed the layout of the Actors box to one actor per line and some blanks between actor and role (ideally this will later become two columns);
- changed the IMDB source page from"main details" to "combined details";
- added import of producer(s);
- changed import of actors/roles to include the full cast;
- added name and year of the movie you are looking up to the header of the title selection picktree;
Here is the code:
"Dances with wolves" has large picture available, but the script returns empty.
"Arlington Road" has a small picture available, but the script returns empty.
"The prince of Egypt" has small pictures available, and also a large for DTS. The script returns empty.
"Evolver" has a small picture available, but the script returns empty.
"Last to surrender" has a small picture available, but the script returns empty.
"Kansas City", idem.
A lot of my movies return a small picture, while there is a large picture available in VHS. I am planning to experiment a bit with importing VHS picture first, and if not found try DVD. (the script now does DVD first, and then VHS).
In the meantime I have made the following changes to the script:
- truncated the year, so that years like "1998/I" also get imported;
- changed category import to show all categories, instead of only the first one;
- added a picklist that allows you to choose the Translated Title from all available 'also known as' titles, or leave it empty; by setting ImportAllAKATitles := True it will bypass the picklist and import all available AKA titles;
- changed the layout of the Actors box to one actor per line and some blanks between actor and role (ideally this will later become two columns);
- changed the IMDB source page from"main details" to "combined details";
- added import of producer(s);
- changed import of actors/roles to include the full cast;
- added name and year of the movie you are looking up to the header of the title selection picktree;
Here is the code:
Code: Select all
Great improvements! I thank you for that.
But there was problem (not an error or anything, but...)
After I've imported all data, I look in the Actors' field and notice.. after the last actor is mentioned, there is a line break and an empty line appears after the last name.......
Corrections, any1?
another thought (perheps not 'needed' for everyone, but..)
if I want the article before the title (IE - THE before, and not after Terminator).
any1 have a code for this?
But there was problem (not an error or anything, but...)
After I've imported all data, I look in the Actors' field and notice.. after the last actor is mentioned, there is a line break and an empty line appears after the last name.......
Corrections, any1?
![wink ;)](./images/smilies/wink.gif)
another thought (perheps not 'needed' for everyone, but..)
if I want the article before the title (IE - THE before, and not after Terminator).
any1 have a code for this?
There is not really an extra line in the actors field, it is merely the CRLF at the end. To fix this make the following change in the code.
Replace these lines (653):
with this line:
Replace these lines (653):
Code: Select all
Value := Value + #13+#10;
FullValue := FullValue + Value;
Code: Select all
if FullValue = '' then FullValue := FullValue + Value else FullValue := FullValue + #13+#10 + Value;
I have made a further improvement to the layout of the actors field.
Replace line 652:
with this line:
It looks less messy and the roles are nicely aligned in a column.
Replace line 652:
Code: Select all
if Value2 <> '' then Value := Value + ' (as ' + Value2 + ')';
Code: Select all
if Value2 <> '' then Value := Value + #9#9#9 + 'as: ' + Value2;
Another improvement to the IMDB (large pic) script
found a few Bugs in my previous script.
1.
In AnalyzeMoviePage the line after looking for 'exec/obidos/ASIN'
should be
I forgot the ";" (that was a nasty bug to find)
Hawkie This causes the problem with "Auto Focus".
2. Also before displaying picture selection window the variable should be set to false so
3. jwm
A lot of problems getting a picture occurs when there is no large one
and as i said before i can't verify GetPicture success
( I've tested "Dances with wolves","The Prince of Egypt" ,"Arlington
Road" ..)
I am working on an improved version which will follow the link in
every paragraph entry and check for large picture existance.
In case no large picture exists . Should it get the Thumbnail from
AMAZON or revert to IMDB ??
( "Arlington road" has no IMDB picture but has a small AMAZON
thumbnail)
1.
In AnalyzeMoviePage the line after looking for 'exec/obidos/ASIN'
should be
Code: Select all
If not PickTreeSelected Then
TitleLine:= FindLine('/exec/obidos/ASIN/',AmazonPage, 0);
if (LineNr > TitleLine) Then LineNr:=-1 [b] ; [/b]
I forgot the ";" (that was a nasty bug to find)
![mad :mad:](./images/smilies/mad.gif)
Hawkie This causes the problem with "Auto Focus".
2. Also before displaying picture selection window the variable should be set to false so
Code: Select all
PicktreeSelected:=False;
// Display the Picture Selection Window
....
3. jwm
A lot of problems getting a picture occurs when there is no large one
and as i said before i can't verify GetPicture success
( I've tested "Dances with wolves","The Prince of Egypt" ,"Arlington
Road" ..)
I am working on an improved version which will follow the link in
every paragraph entry and check for large picture existance.
In case no large picture exists . Should it get the Thumbnail from
AMAZON or revert to IMDB ??
( "Arlington road" has no IMDB picture but has a small AMAZON
thumbnail)
I know it is not so easy as it may seem to some people.
I appreciate your efforts in finding improvements. Thanks.
My preference would be:
-find large image in DVD;
-if not found then find large image in VHS;
-if not found then find small image in IMDB;
-if not found then find small image in DVD;
-if not found then find small image in VHS;![ha :ha:](./images/smilies/rolleyes.gif)
![wink ;)](./images/smilies/wink.gif)
I appreciate your efforts in finding improvements. Thanks.
![smile :)](./images/smilies/smile.gif)
My preference would be:
-find large image in DVD;
-if not found then find large image in VHS;
-if not found then find small image in IMDB;
-if not found then find small image in DVD;
-if not found then find small image in VHS;
![ha :ha:](./images/smilies/rolleyes.gif)
IMDB (large image) script. images change for other entries
I just installed Ant and have put some movies into it. I am using the IMDB script that was included in the installation to download the rest of the information for my movies including the images. I have noticed that some of the movies I have previously retrieved information for, have gotten their image get's changed to another movie's image.
What I'm thinking is that the file names of the images that are stored on my hard drive are exactly as their are named on amazon or wherever the IMDB script gets it. So it probably is overwriting an image that I had already gotten for another movie.
Is this what is happening? Or am I doing something wrong with the way i'm saving.
What I'm doing now, is after I use the script to retrieve the information, I immeditately go to the picture on the bottom left and click on the folder to select a picture, but what i do is rename the file, usually it's named 30m.jpg, 20.jpg to the moviename.jpg. So far it's working but I'm sure there's a better way to go about this.
Booker
What I'm thinking is that the file names of the images that are stored on my hard drive are exactly as their are named on amazon or wherever the IMDB script gets it. So it probably is overwriting an image that I had already gotten for another movie.
Is this what is happening? Or am I doing something wrong with the way i'm saving.
What I'm doing now, is after I use the script to retrieve the information, I immeditately go to the picture on the bottom left and click on the folder to select a picture, but what i do is rename the file, usually it's named 30m.jpg, 20.jpg to the moviename.jpg. So far it's working but I'm sure there's a better way to go about this.
Booker
Followup to my previous post about images changing
After doing some other testing, the easiest thing to do is to just save the catalog after the script retrieves the information. From what I can tell the catalog saves the image in the amc file also so once you've saved it doesn't matter if the image files downloaded by the script overwrite each other. Correct me if I am wrong here on my assumption that the image file is saved in the .amc file.
For the time being have to save after every update via this script so that it correct saves the image isn't so bad. But for future features I hope something could be done about it.
booker
For the time being have to save after every update via this script so that it correct saves the image isn't so bad. But for future features I hope something could be done about it.
booker
That's quite strange.
The picture is directly saved in the catalog, or as an external file, but it does not change from one to another.
It depends of the True/False parameter of the GetPicture function call in the script.
Only .XML will force the picture to be saved as external file when saving the catalog. If you use a .AMC file it will keep the picture as it is, internal or external.
The picture is directly saved in the catalog, or as an external file, but it does not change from one to another.
It depends of the True/False parameter of the GetPicture function call in the script.
Only .XML will force the picture to be saved as external file when saving the catalog. If you use a .AMC file it will keep the picture as it is, internal or external.
I cleaned a little the large pic script.
I'll update the program soon, so it would be nice if you could say if this version of the script is ok for you, and use this one as basis for future versions/modifications :
http://www.antp.be/temp/IMDB%20(large%20pic).ifs
For the future, it would be nice to put a link to a file on a http/ftp server instead of putting the whole script in the forum, since this script becomes quite large (25 KB)
I'll update the program soon, so it would be nice if you could say if this version of the script is ok for you, and use this one as basis for future versions/modifications :
http://www.antp.be/temp/IMDB%20(large%20pic).ifs
For the future, it would be nice to put a link to a file on a http/ftp server instead of putting the whole script in the forum, since this script becomes quite large (25 KB)
I'll try it out.
What i've been doing is cataloging my cd folders (200cd capacity) by importing them from a spreadsheet file (openoffice, save as cvs format). It would be nice in future versions for a folder field (i.e. dvd folder 1) but I noticed the next version should have some custom field options.
So I'm going to be starting another catalog file and import the this cvs file of another caselogic folder. It would be nice if there was a feature to run this import script for each entry to great the information from imdb etc. But it's fine for now since it keeps messing up the the imported picture. (Haven't tried to new script tho).
I'll try the new script out.
So I'm going to be starting another catalog file and import the this cvs file of another caselogic folder. It would be nice if there was a feature to run this import script for each entry to great the information from imdb etc. But it's fine for now since it keeps messing up the the imported picture. (Haven't tried to new script tho).
I'll try the new script out.
Is the above script
http://www.antp.be/temp/IMDB%20(large%20pic).ifs
newer than than the one included in the 3.4.2 full install?
Booker
http://www.antp.be/temp/IMDB%20(large%20pic).ifs
newer than than the one included in the 3.4.2 full install?
Booker