English > Development

How to change "viewed" flag by script

<< < (2/2)

Nautilus2067:
Just to be sure:

AddFieldValueXML( 'viewed', '-1' );
AddFieldValueXML( 'viewed', '1' );
AddFieldValueXML( 'viewed', '0' );
AddFieldValueXML( 'viewed', 'True' );
AddFieldValueXML( 'viewed', 'true' );
AddFieldValueXML( 'viewed', ' ' );

This is the command I am using. I replaced all variables by direct values. None of the variants works. Maybe it's because of the data type. The flag is boolean. Same as "wish" and "loan". "wish" doesn't work either.
Does anybody know the field number so I can try the deprecated command:
AddFieldValue( )?

Nautilus2067:
-1 and 0 should be the correct values because they work with custom fields. We may have a bug here.

Nautilus2067:
The Field number is 36. So I have tried


--- Code: ---AddFieldValue( 36, '-1' );
--- End code ---

That didn't work either.

I am frustrated!

nostra:
It works actually, but the problem is that the script can't overwrite the default value as there is no option in Settings -> Plugins for this field.
You can find your script in pvdconf.ini with an equal sing and lots of numbers ones mostly. You can switch all of them to twos or for the viewed field the 36th one.
Smth like this:

--- Code: ---AllMovie.com.psf=22222222222222222222222222222222222222222222222222222222222222222222222222222222
--- End code ---

Nautilus2067:
Works perfectly. Thanks!

Navigation

[0] Message Index

[*] Previous page

Go to full version