Personal Video Database
English => Development => Topic started by: Nautilus2067 on May 14, 2013, 04:00:37 pm
-
Hi there,
I have just finished my draft version of an .nfo import script to import locally saved meta data (from MediaPortal). The watch status is stored separately in a small XML file beside every movie. I have succeded to read that file but using the AddFieldValueXML( ) function on the field "viewed" does not change the viewed flag.
Is it possible to change that field via script? If yes, how can it be done? I tried "true" and "false" as well as "0" and "1". Nothing worked.
Thanks for your help.
Oliver
-
-1?
-
Nope, doesn't seem to work.
-
"Minus one"? It should. Unfortunately, I have no ideas left.
-
Why -1 instead of 1? Do you know that? I can set the "viewdate" successfully, but not the "viewed" flag. hmmm...
-
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( )?
-
-1 and 0 should be the correct values because they work with custom fields. We may have a bug here.
-
The Field number is 36. So I have tried
AddFieldValue( 36, '-1' );
That didn't work either.
I am frustrated!
-
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:
AllMovie.com.psf=22222222222222222222222222222222222222222222222222222222222222222222222222222222
-
Works perfectly. Thanks!