How call a def from settings.xml
#1
Hello!, i dont understand how call a def from settings.xml.... i'm use this tag <setting label="32032" type="action" action="RunScript(plugin.addon.testAddon, callDb)"/>
and in python i create this def -> def callDb():         conn.execute(sqlScript)
Reply
#2
You can't do it like that.  Your plugin will have to parse the parameter you pass to it (it'll be in sys.argv[2]) and call your callDb function based off that.

Something like
python:

if sys.argv[2] == "callDb"
    callDb()
Learning Linux the hard way !!
Reply
#3
Thank you so much but doesn't work
Reply
#4
This would be better in add-on development.

Moving it there.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply

Logout Mark Read Team Forum Stats Members Help
How call a def from settings.xml0