Page 1 of 1

[REQ] help in IMDB script batch processing / Catalog update

Posted: 2008-11-25 07:26:39
by stormy1777
How can I run batch script to modify all OLD IMDB URLs to the latest ones? I managed to do this for the Rating field (too bad there is no field for count of votes!!)

I tried to find where/if the URL is expanded internally, but can not figure out.

I know how to run batch mode, but not where/what to change to pickup and replace only the new URL. Also, if I do it, is there a way to also pickup any currently EMPTY fields? for example, description, or even director might be empty in my DB but updated in IMDB.. so this is a general update catalog question as well. If field already exist in my DB I would not like to update at all...

Thanks!

Posted: 2008-11-25 14:16:25
by antp
What are the old & new urls looking like? It should be quite easy to convert these, as the part that changes (the movie number) is the same.

About your other question, if you do not want existing values to be overwritten by a script (hey I should have added such option :D), you can modify the script. Before each "setfield" line, add a "getfield" to check if the field is empty
e.g. if you have a
setfield(fieldDescription, value);
add just above that a
if getfield(fieldDescription) = '' then
So it will set the field only if it is empty.