HOW-TO write GUI settings for XBMC python plugins and scripts (addons) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: HOW-TO write GUI settings for XBMC python plugins and scripts (addons) (/showthread.php?tid=29577) |
setSettings Help - teshephe - 2010-09-09 I am trying to use a script within my plugin to prepopulate items in the settings based on the local host, the script itself works up to the point of actually putting the returned data into the designated setting I have specified. Here is my code: Code: import subprocess, platform Help would be appreciated. Thanks! - amet - 2010-09-09 Code: import subprocess, platform should work fine, if not post the debug log - teshephe - 2010-09-09 Amet Wrote:should work fine, if not post the debug log Nope: This is what I get: Code: 15:06:30 T:139681446573840 M:3015421952 ERROR: Traceback (most recent call last): - amet - 2010-09-09 you said it worked up to the point of putting it in to the setting, obviously not - teshephe - 2010-09-09 Amet Wrote:you said it worked up to the point of putting it in to the setting, obviously not Strange, it does if I run it in a python shell but does not in XBMC, Any Ideas?? - amet - 2010-09-09 teshephe Wrote:Strange, it does if I run it in a python shell but does not in XBMC, Any Ideas?? what is the IP address from? the machine running xbmc? Code: import xbmc - teshephe - 2010-09-09 Amet Wrote:what is the IP address from? the machine running xbmc? Yes, all local. - amet - 2010-09-09 teshephe Wrote:Yes, all local. Code: import xbmc - chippyash - 2010-09-09 @amet made changes you suggest, still same error in debug Code: DEBUG: OnKey: 61453 pressed, action is Select What else can I try to track down reason for error - is there some extra debugging I can use? - amet - 2010-09-09 chippyash Wrote:@amet dont worry about that error, its harmless I must have about million of them in my log - teshephe - 2010-09-09 Amet Wrote:what is the IP address from? the machine running xbmc? Thanks! I had to change it a little to Addon.setSetting(id="localhost", value=xbmc.getIPAddress()) though. You rock!! Now how about that font question (bump)? - amet - 2010-09-09 teshephe Wrote:Thanks! I had to change it a little to Addon.setSetting(id="localhost", value=xbmc.getIPAddress()) though. yeah, copy/paste can be a bitch teshephe Wrote:You rock!! Now how about that font question (bump)? no way to set a different font for settings atm, sry - chippyash - 2010-09-09 Amet Wrote:dont worry about that error, its harmless I must have about million of them in my log yeah but the settings dialog still doesn't show up! - amet - 2010-09-10 chippyash Wrote:yeah but the settings dialog still doesn't show up! works just fine here, what does it look like? any errors? - chippyash - 2010-09-10 Amet Wrote:works just fine here, what does it look like? any errors?Only the error that I am showing you in the debug (cpluff error). The dialog simply doesn't display as I expect when I click on Addon Settings from the context menu. I also ran the addon on my production XBMC server which is Ubuntu. Same problem Also, can you point me to the up to date documentation for settings, I'd like to include it in the new documentation I'm writing - I think JM cc'd you in on the issue trac ticket Thanks Ashley |