HOW-TO write GUI settings for XBMC python plugins and scripts (addons)

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
amet Offline
Retired Team-Kodi Member
Posts: 4,111
Joined: Jul 2009
Reputation: 41
Location: Novi Sad / Dubai
Post: #76
chippyash Wrote: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

this is what I see:

[Image: settings.jpg]

chippyash Wrote: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

what you see in this thread is all we have in terms of documentation for settings. looking at few Addons settings would cover all the settings that we have.

btw, good work on the documentation so far Nod

Cheers,
Zeljko
find quote
chippyash Offline
Senior Member
Posts: 130
Joined: Jan 2010
Reputation: 0
Location: Northants, UK
Post: #77
Amet Wrote:this is what I see:

ah ha - now I see where you are at. Yes I can get to it via that route - System - Addons - Enabled Addons.

Also I can select Music - Music Addons - select Gpodder (but don't click on it), press C (context menu) and select Addon Settings. That works too

But if I click on Gpodder to display its listing and then try to get to Addon Settings via the context menu, nothing appears.

If I do the same with another addon - say the Giant Bomb video addon I can get to the addons settings.

Do I need to do something else?

Thanks for your kind words btw, I hope doc will be useful to others when it is finished.

Cheers
Ashley

System info: Asrock ION330HT-BD (Intel Atom 330 4 core i686) connected to Sony KDL-Z5800 TV using hdmi via Onkyo TX-SR507 AV Amp. [Old Config Ubuntu 12.04. (Linux 3.2.0-32-generic-pae ) XBMCBuntu (Eden 11.0 Git:unknown Compiled Mar 24 2012). OpenGL 3.3.0 NVIDIA 280.13] New Config unknown - no working XBMC at moment!
find quote
amet Offline
Retired Team-Kodi Member
Posts: 4,111
Joined: Jul 2009
Reputation: 41
Location: Novi Sad / Dubai
Post: #78
chippyash Wrote:ah ha - now I see where you are at. Yes I can get to it via that route - System - Addons - Enabled Addons.

Also I can select Music - Music Addons - select Gpodder (but don't click on it), press C (context menu) and select Addon Settings. That works too

But if I click on Gpodder to display its listing and then try to get to Addon Settings via the context menu, nothing appears.

If I do the same with another addon - say the Giant Bomb video addon I can get to the addons settings.

Do I need to do something else?

Thanks for your kind words btw, I hope doc will be useful to others when it is finished.

Cheers
Ashley

there must be an error in the code, check your PM
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #79
how do you setSettings for a bool type?

settings.setSetting(id="foo", value="true"())

I keep getting a script error telling me "object is not callable" No

Thanks

Enjoy OpenSource! :nod:
MY SETUP: XBMC 12 Frodo RC3, Multiple Asus EB1501's throughout the Home for XBMC based STB's
find quote
ppic Offline
Skilled Python Coder
Posts: 2,711
Joined: Feb 2009
Reputation: 11
Location: France idf
Post: #80
settings.setSetting(id="foo", value=True)

[Image: widget]
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #81
ppic Wrote:settings.setSetting(id="foo", value=True)

Thanks PICC! Still needed the quotes "True" though. Wink

Enjoy OpenSource! :nod:
MY SETUP: XBMC 12 Frodo RC3, Multiple Asus EB1501's throughout the Home for XBMC based STB's
find quote
ppic Offline
Skilled Python Coder
Posts: 2,711
Joined: Feb 2009
Reputation: 11
Location: France idf
Post: #82
2 "P, 1 "c" is a better way to write my nickname Wink

good it worked!

[Image: widget]
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #83
ppic Wrote:2 "P, 1 "c" is a better way to write my nickname Wink

good it worked!

LOL!!! Sorry about that! Big Grin and yes, that fixed it. Thanks

Enjoy OpenSource! :nod:
MY SETUP: XBMC 12 Frodo RC3, Multiple Asus EB1501's throughout the Home for XBMC based STB's
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #84
Anyway to have get a value from whatever is put into another setting?

Enjoy OpenSource! :nod:
MY SETUP: XBMC 12 Frodo RC3, Multiple Asus EB1501's throughout the Home for XBMC based STB's
(This post was last modified: 2010-09-20 21:13 by teshephe.)
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #85
;-)

Enjoy OpenSource! :nod:
MY SETUP: XBMC 12 Frodo RC3, Multiple Asus EB1501's throughout the Home for XBMC based STB's
(This post was last modified: 2010-09-20 21:13 by teshephe.)
find quote
chippyash Offline
Senior Member
Posts: 130
Joined: Jan 2010
Reputation: 0
Location: Northants, UK
Post: #86
Quote:I know this is probably not the right thread

Correct! You are tail gating another thread on a different subject, just like you did with your original post! Problem is, people read the titles in the thread list, so will probably never find your question. Thread followers just ignore you (except me of course). Once you've exhausted forum search, I suggest you start your own thread with a new question.

System info: Asrock ION330HT-BD (Intel Atom 330 4 core i686) connected to Sony KDL-Z5800 TV using hdmi via Onkyo TX-SR507 AV Amp. [Old Config Ubuntu 12.04. (Linux 3.2.0-32-generic-pae ) XBMCBuntu (Eden 11.0 Git:unknown Compiled Mar 24 2012). OpenGL 3.3.0 NVIDIA 280.13] New Config unknown - no working XBMC at moment!
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #87
Big GrinI have a script that is called via the autoexec.py, my question is how do I get the settings from another addon?

Enjoy OpenSource! :nod:
MY SETUP: XBMC 12 Frodo RC3, Multiple Asus EB1501's throughout the Home for XBMC based STB's
find quote
ppic Offline
Skilled Python Coder
Posts: 2,711
Joined: Feb 2009
Reputation: 11
Location: France idf
Post: #88
Code:
example:
- self.Settings = xbmc.Settings(uuid=os.uuid())

uuid is the path to the script directory, so try to pass the path of the plugin/script you want.

[Image: widget]
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #89
ppic Wrote:
Code:
example:
- self.Settings = xbmc.Settings(uuid=os.uuid())
uuid is the path to the script directory, so try to pass the path of the plugin/script you want.

Thanks 2 P 1 c!!!!Big Grin

I finally figured it out after much Trial and error... working like a champ. I am still wrestling with 2 items though...Oo

Trying to pull the info for the web server port into my addon settings (default is 8080) i know but some people usually change it so I need to pull that info from XBMC along with the list of availabe sound devices. Would you happen to know off hand what they are?

I know to get the local IP is xbmc.getIPAddress()..

Enjoy OpenSource! :nod:
MY SETUP: XBMC 12 Frodo RC3, Multiple Asus EB1501's throughout the Home for XBMC based STB's
find quote
ppic Offline
Skilled Python Coder
Posts: 2,711
Joined: Feb 2009
Reputation: 11
Location: France idf
Post: #90
why do you need it ?

[Image: widget]
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
find quote
Post Reply