1

I've got my settings.xml file in resources folder in my xbmc add-on and it shows up fine. How do I make my default.py file now read these settings?

manicphase
  • 618
  • 6
  • 9

1 Answers1

1

Worked it out.

You (or rather, I) have to import xbmcaddon and use .getSetting([xml id])

e.g.

import xbmc
import xbmcgui
import xbmcaddon

...

settings = xbmcaddon.Addon(id='script.usb.autoplay')
df = settings.getSetting("defaultfolder")
xbmc.executebuiltin("PlayMedia(%s, isdir)" % df)

edit: was wrong, now it's right

manicphase
  • 618
  • 6
  • 9
  • Yeah it is. Sorry for taking forever to confirm this. For anyone else that may be confused, that was just the name of my script. – manicphase Apr 21 '13 at 13:46
  • @manicphase Can you share content of your `settings.xml`. Also is it possible NOT to show some setting key in GUI? For instance password? – Volatil3 Jan 30 '14 at 14:24