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

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
the_observer
Posts: 62
Joined: 2009-11-12 05:53:14

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

Post 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.
soulsnake
Posts: 756
Joined: 2011-03-14 15:42:20
Location: France

Post 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.
the_observer
Posts: 62
Joined: 2009-11-12 05:53:14

Post by the_observer »

Very precise answer.

Works like a charm now.

Thank you soulsnake.

Regards,
the_observer.
Post Reply