HOW-TO write GUI settings for XBMC python plugins and scripts (addons) - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: HOW-TO write GUI settings for XBMC python plugins and scripts (addons) (/showthread.php?tid=29577)
- Dan Dare - 2009-08-31 10:43
The first post says it pretty clearly, this is for plugins, not scripts.
- digitaldesaster - 2009-08-31 10:49
In Germany whe say: "Wer lesen kann ist klar im Vorteil". sorry..
- f3ar007 - 2009-11-14 06:56
Hi, I'm trying to use the "enum" plugin setting; however, it reads the place in "enum" line, for instance:
The python code:
If 11-13-2009 is selected, the returned value *should* be /11-13-2009/; instead, it returns /10-12-0/ or very similar. **The number in line, beginning at zero. Is there a way to get the actual value from the "enum" setting, instead of its ordinal value?
- jmarshall - 2009-11-14 07:17
I believe that's what the enum does - it returns the index rather than the value. If you want the value you should know it anyway, right (after all, you supplied the values). For consecutive numbers with a min and a max you can probably do it without the enum at all, right? The enum stuff is designed for non-consecutive numbers.
- f3ar007 - 2009-11-14 07:21
Well, I am trying to create a sort of calendar like select. (Should be obvious by the example. ) Although, I'm not sure how I could accomplish this without the "enum" option. Is there a better way?
This is a feature request for one of my plugins. The users mentioned entering dates was a long process, this will hopefully speed it up!
## Figured this one out...
Just checked the length of the "enum" index and returned a zero in front of single digits or nothing in front of double digits.
Checked the year against a string.
- Nuka1195 - 2009-12-01 16:18
<setting id="archiveDay" type="labelenum"
- VictorV - 2009-12-18 18:32
Would it be possible to create a slider option? With min, max and step size?
- spiff - 2009-12-18 18:39
possible, yes, available, no.
- Nuka1195 - 2009-12-18 19:14
i already submitted a ticket for this along time ago. among others.
spiff or anybody check out that settings cleanup ticket. a comment would have been nice.
Drive sselection - D0nR0s4 - 2009-12-27 05:36
Hi, just saw the possibility for the settings.xml and it works like a charm. Only thing that I would like/need for my script, is the possibility to select a hard or cd/dvd drive.
I mainly need the letter(on Windows) of the dvd drive from which I get the state with "getDVDState". I didn't find anything about this so I thought I could use a settings entry but I found no chance to select the dvd drive with the folder or file setting types.
I hope someone can help me,
Edit: Sorry, problem was an error in xbmc that prevented me from accessing the dvd drive