Page 1 of 1
Modifying IMDB script
Posted: 2012-06-11 16:37:26
by doveman
I use AMC and Myfilms/AMCU and I'd like to make the grabbing consistent between them.
AMCU puts the Classification in a Custom field "Classification" so I'd like to make AMC's IMDB script do the same. At the moment it offers the option to put it in the Media Label or Comments field, but I want to use the Media Label field for it's proper purpose and want the Classification in it's own field, rather than comments, so that I can sort/group by it.
AMCU also puts the Tagline in a Custom field. I'm not decided on whether I prefer that or having it at the start of the Description, as AMC does now, but I'd like to know how to modify the AMC IMDB script to put the Tagline in the Custom field if I decide to.
Posted: 2012-06-11 19:56:34
by antp
AMCU =
http://sourceforge.net/projects/amcupdater/ ? (I found that with Google, I didn't even know it existed)
For the IMDB script, you could search where it sets the value (using SetField) and replace that by a SetCutomField call.
e.g. if there is a
SetField(fieldMedia, SomeVariable);
you could put
SetCustomField('ClassificationFieldTag', SomeVariable);
where SomeVariable is the variable used in the script
and ClassificationFieldTag is the tag associated to the custom field (to be put with the quotes)
Posted: 2012-06-12 01:02:17
by doveman
Sorry, I would have clarified but I thought you'd be aware of AMCU already
Thanks for the tips, I'll have a look at the IMDB script and see if I can modify it to suit my preference.
Posted: 2012-06-12 13:35:57
by doveman
OK, looks like the relevant section is
Code: Select all
if GetOption('Classification') > 0 then
begin
if UserCountry = '' then
ShowMessage('Country not set for classification selection - Click "Editor" tab in the scripting window, then select your country by modifying the required line as explained in the first lines of the code')
else
begin
Value := TextBetween(PageText, '<a href="/search/title?certificates=', '</div>');
Value := TextBetween(Value, UserCountry + ':', '</a>'); if Value <> '' then
begin
if GetOption('Classification') = 1 then
SetField(fieldMediaType, Value)
else
SetField(fieldComments, GetField(fieldComments) + #13#10 + #13#10 + 'Classification: ' + Value);
end;
so if I set Classification setting to 1 then can I just modify the latter part to:
Code: Select all
begin
if GetOption('Classification') = 1 then
SetCustomField('Certification', Value)
else
SetField(fieldComments, GetField(fieldComments) + #13#10 + #13#10 + 'Classification: ' + Value);
end;
where Certification is the custom field?
Posted: 2012-06-12 13:51:52
by antp
Yes, it should work
Posted: 2012-06-12 14:18:15
by doveman
Cool, I tested and it works great
import studio / production company
Posted: 2012-08-08 06:56:31
by spiderman
I would like an import function for production company.
thanks in advanced