v18 Check the TMDb movie scraper addon's settings?
#1
Hi,

I'm making some mods to Estuary and I'd like to check the certprefix and tmdbcertcountry settings for the TMDb Movie scraper addon.

I've found them in the: userdata\addon_data\metadata.themoviedb.org\settings.xml file but don't know how to use them in the skin.

Can anyone tell me how to read them in? I've tried $VAR[tmdbcertcountry] but it doesn't seem to work. I'm guessing it's because the addon isn't loaded at the time?

Thanks,

bored
Reply
#2
I'm not 100% sure about accessing settings of other addons, but I once did a skin mod where I stored all the new text strings in an addon so I didn't have to mod the language files.  To access a given string I did this:

$ADDON[script.module.cmpl 30004]

So maybe $ADDON[metadata.themoviedb.org tmdbcertcountry] would work?
Reply
#3
Thanks for the suggestion. When I tried it, it didn't seem to actually parse it. It just displayed the text: $ADDON[metadata.common.themoviedb.org tmdbcertcountry]

I found a label in the quartz skin with: $ADDON[script.cu.lrclyrics 32005] so I tried that, and that just comes up blank... I'm guessing that it is parsing correctly, I just don't have the addon installed.

When I tried $ADDON[metadata.common.themoviedb.org 12345], that too comes up blank. It must be parsing correctly, but not returning a value. It seems the addon name must be followed by a number for it to parse correctly, so I guess I'm out of luck with this... It must just be a way of pulling back the output from the addon, but the scraper won't provide output.

The I guess only way I'm going to be able to do this is by running a Python script to read the file. If it was bash, vbscript or powershell then it wouldn't be a problem for me to write what I need but Python is just weird.

Edit: Looks like this is the exact thing I need: https://codedocs.xyz/xbmc/xbmc/group__py...bd180af650

Code:
Function: xbmcaddon.Addon([id]).getSettingString(id)

Returns the value of a setting as a unicode string.

Parameters
id string - id of the setting that the module needs to access.

Returns
Setting as a unicode string

v18 Python API changes:
New function added.

Example:
..
apikey = self.Addon.getSettingString('apikey')

Now I just need to work out how to use it to pull the info to a variable in a skin.
Reply

Logout Mark Read Team Forum Stats Members Help
Check the TMDb movie scraper addon's settings?0