setSetting() doesn't work [Frodo] - 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: setSetting() doesn't work [Frodo] (/showthread.php?tid=179737) Pages:
1
2
|
setSetting() doesn't work [Frodo] - realtebo - 2013-12-06 Code: plugin_pid = int(sys.argv[1]) After a first, fresh, clean, installation, in the addon_data dir there is no folder plugin.video.jworg, because no setting saved yet. At every run, the plugin try to detect the locale choosen by the user. If there is no locale set, than for a small set of xmbc locale names I can match the plugin "stream content locale". For example: if no locale set, if xmbc is set to "Italian" then I execute this to set to "Italiano", Code: xbmcplugin.setSetting(plugin_pid, "language", "Italiano") This line of code is being executed, doesn't creeate any error in log file, but no addon_data .xml file is created. So when I open my addon config, I got for locale the first locale in list, and not the 'auto set' locale I've just set. My setting.py row about locale Code: <setting id="language" type="labelenum" label="30002" values="Afrikaans|Deutsch|English|Español|Français|Ελληνική|Italiano|Magyar|Nederlands|Polski|Português" /> There is something else to do after call setSetting()? RE: setSetting() doesn't work [Frodo] - realtebo - 2013-12-06 ALSO: if You try to use setSetting for a non-existent setting id, the function itself doesn't generate any kind of info/warning/trace/debug log row. RE: setSetting() doesn't work [Frodo] - fightnight - 2013-12-06 You set the number of value.. Italiano should be 6.. starts in 0. RE: setSetting() doesn't work [Frodo] - Martijn - 2013-12-06 it works in my addons for sure. for existing or non existing IDs RE: setSetting() doesn't work [Frodo] - divingmule - 2013-12-07 Maybe use xbmcaddon instead of xbmcplugin. xbmcplugin seems redundant sense plugins rely on xbmcaddon, or am I missing something?? RE: setSetting() doesn't work [Frodo] - realtebo - 2013-12-08 What's the difference from xbmcplugin and xbcaddon class? RE: setSetting() doesn't work [Frodo] - Martijn - 2013-12-08 not sure the xbmcplugin.setSetting even works anymore. Will ask. xbmcaddon.setSetting works for sure RE: setSetting() doesn't work [Frodo] - realtebo - 2013-12-08 (2013-12-06, 18:26)fightnight Wrote: You set the number of value.. Italiano should be 6.. starts in 0. "TypeError: argument "value" for method "XBMCAddon::xbmcplugin:etSetting" must be unicode or str" RE: setSetting() doesn't work [Frodo] - realtebo - 2013-12-08 (2013-12-08, 15:07)Martijn Wrote: not sure the xbmcplugin.setSetting even works anymore. Will ask. Yes, this works, and, also, setSetting NEED a string, not a number, not a progressive ID, whn using 'type="labelenum" ' Code: <settings> Id not work, please REMOVE from api doc:http://mirrors.xbmc.org/docs/python-docs/stable/xbmcplugin.html RE: setSetting() doesn't work [Frodo] - demmax2004 - 2013-12-19 Му config: XBMC\addons\script.ambibox\resources\settings.xml PHP Code: <?xml version="1.0" encoding="utf-8" standalone="yes"?> My code does not work PHP Code: __settings__ = xbmcaddon.Addon( "script.ambibox" ) WTF RE: setSetting() doesn't work [Frodo] - Karnagious - 2013-12-19 Maybe try this? Code: sett.setSetting(id="show_menu",value='1') RE: setSetting() doesn't work [Frodo] - demmax2004 - 2013-12-19 (2013-12-19, 08:36)Karnagious Wrote: Maybe try this? not work RE: setSetting() doesn't work [Frodo] - realtebo - 2013-12-19 please copy/past the setting file (i tink it's in userdata folder) to undersand how xbmc set it natively RE: setSetting() doesn't work [Frodo] - demmax2004 - 2013-12-19 settings file in c:\Users\dem\AppData\Roaming\XBMC\addons\script.ambibox\resources\settings.xml RE: setSetting() doesn't work [Frodo] - giftie - 2013-12-21 (2013-12-19, 06:14)demmax2004 Wrote: Му config: XBMC\addons\script.ambibox\resources\settings.xml For one you have two key labels the same... You more than one key label('show_menu') in the settings file. |