Page 1 of 1

Imdb script storing a value in a custom field in AMC 4.12

Posted: 2013-02-02 23:06:40
by the_observer
Hi all.

with the newer version of AMC (4.1.2) there is the option to have custom fields.

What i would like to do is to pass the imdb score for a movie to such a custom field.

Up to now i was storing the imdb score with the votes to the field media label.In order to do that i was modifying the imdb script like this:
1. In the imdb script I was finding this :

Code: Select all

if (GetOption('UserRatings') = 1) and (Value <> '') and (CanSetField(fieldMediaType)) then
        SetField(fieldMediaType, Value);
and then i was substituting it with this code:

Code: Select all

if (GetOption('UserRatings') = 1) and (Value <> '') and (CanSetField(fieldMedia)) then
        SetField(fieldMedia, Value);
So the imdb score with the votes was stored in the field media label.

Is there an idea how to do it now in order to store the imdb score with votes in a custom field which i create for this purpose?

Thank you for your time reading this.

Regards,
the_observer.

Posted: 2013-02-02 23:28:16
by soulsnake
Hi,

You can use this:

Code: Select all

if (GetOption('UserRatings') = 1) and (Value <> '') and (CanSetCustomField('CustomFieldTag')) then
        SetCustomField('CustomFieldTag', Value);
Replace CustomFieldTag by the tag that you choose for your custom field.

Soulsnake.

Posted: 2013-02-02 23:33:38
by the_observer
Very precise answer.

Works like a charm now.

Thank you soulsnake.

Regards,
the_observer.