Plugin and Script API documentation and other useful links for XBMC Addon Developers

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,333
Joined: Jan 2008
Reputation: 2
Location: US
Information  Plugin and Script API documentation and other useful links for XBMC Addon Developers
Post: #1
None of this is really hidden but I guess it is useful to have it compiled in one place.

The xbmc modules:
http://mirrors.xbmc.org/docs/python-docs/

Non-python functions that are useful for scripting:
List of Built in Functions
HTTP API
InfoLabels
special:// Paths

How-tos (may be outdated):
Plugins
Scripts [1]
http://wiki.xbmc.org/?title=HOW-TO_write_Python_Scripts]Scripts [2]

General Python Info:
http://www.python.org/doc/
http://diveintopython.org/toc/index.html
http://pound-python.org/
http://stackoverflow.com/questions/tagged/python
http://python.net/~goodger/projects/pyco....html#id10

A few useful libs for scraping websites:
http://pypi.python.org/pypi/simplejson/ (included in py2.6 + )
http://effbot.org/zone/pythondoc-element...ntTree.htm (included in py2.6 + )
http://www.crummy.com/software/BeautifulSoup/
http://www.feedparser.org/
http://wwwsearch.sourceforge.net/mechanize/
http://wwwsearch.sourceforge.net/ClientForm/


If you think there is anything I missed that needs to be mentioned just reply to this post and I'll update.

Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
(This post was last modified: 2012-10-31 12:35 by spiff.)
find quote
qwarlock Offline
Junior Member
Posts: 8
Joined: Nov 2009
Reputation: 0
Post: #2
Hey Guys,

Sorry if this is posted somewhere but I am not seeing it. I really like XBMC and I recomend/ push it on all my friends. I like the idea of the central addon control center.
Is there any docs on how this new section affects plugin dev and installation? I have a few plugins like the podcast script (That lets you download and listen to podcasts from pretty much anywhere) that no longer work. I would love to see docs that would give clues on how to convert this script to be usable in the new environment. Any docs on this or HowTos would be appreciated. I do not think the old plugin docs are still valid...or.... are they.....
find quote
ppic Offline
Skilled Python Coder
Posts: 2,711
Joined: Feb 2009
Reputation: 11
Location: France idf
Post: #3
ask the script author to update it first Wink

[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
qwarlock Offline
Junior Member
Posts: 8
Joined: Nov 2009
Reputation: 0
Post: #4
Hey Guys,

Yea the ultimate will be when all the plugins are updated but for me this is
a great way for me to crack into building and adjusting Addons and Plugins.
I did find wiki.xbmc.org/index.php?title=Addons_for_XBMC that had a bit
on the changes and some clues enough for doing an update. I was able to
get the Podcasts script back up and running. Whoo hoo!!!

I moved on to MTV and now I am back to stumped. I am getting xbmcplugin.getSettings requires two arguments but only has one error.

I am having fun with this and it again seems like a cool way for me to learn
more about the great xbmc system and how to modify it and get even more
out of it.

So I guess next I need to see where getSettings usage is changed.

from
steveZ

Thanks again guys for all the spiffy work!
find quote
giftie Online
Skilled Python Coder
Posts: 2,364
Joined: Mar 2010
Reputation: 54
Location: Calgary, Alberta
Post: #5
You might want to try replacing the xbmcplugin.getSetting() with xbmcaddon.getSetting()
find quote
amet Offline
Retired Team-Kodi Member
Posts: 4,090
Joined: Jul 2009
Reputation: 41
Location: Novi Sad / Dubai
Post: #6
qwarlock Wrote:Hey Guys,

Yea the ultimate will be when all the plugins are updated but for me this is
a great way for me to crack into building and adjusting Addons and Plugins.
I did find wiki.xbmc.org/index.php?title=Addons_for_XBMC that had a bit
on the changes and some clues enough for doing an update. I was able to
get the Podcasts script back up and running. Whoo hoo!!!

I moved on to MTV and now I am back to stumped. I am getting xbmcplugin.getSettings requires two arguments but only has one error.

I am having fun with this and it again seems like a cool way for me to learn
more about the great xbmc system and how to modify it and get even more
out of it.

So I guess next I need to see where getSettings usage is changed.

from
steveZ

Thanks again guys for all the spiffy work!


here is how the getSetting should be used

http://wiki.xbmc.org/index.php?title=Xbmcaddon_module

or pastebin what you have so far and I can look at it
find quote
qwarlock Offline
Junior Member
Posts: 8
Joined: Nov 2009
Reputation: 0
Post: #7
Perfect! Thanks!!!!! They added

pluginhandle = int(sys.argv[1])
xbmcplugin.getSetting(pluginhandle, "MySetting")

That fixed a dozen errors. YEAY! Now MTV gets all the way to the
Playing of the video. Everything else is cool. I get the list of vodeos
and artists and pics. but when we get to playing the video I see errors
for things like rtmp protocal not supported.

Wow this is actually pretty fun!

from
steveZ
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #8
Nice - looking forward to see what you come up with Smile

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
chippyash Offline
Senior Member
Posts: 130
Joined: Jan 2010
Reputation: 0
Location: Northants, UK
Post: #9
[QUOTE=qwarlock;570753
I did find wiki.xbmc.org/index.php?title=Addons_for_XBMC[/quote]

Um, yep - saw that but unfortunately it doesn't give examples for anything than confluence skin. Would be good to see examples for instance for an addon that gets included in music or video (or both). Sorry - would have left a comment on the wiki page but no facility to do that.

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
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #10
You mean like this:

http://wiki.xbmc.org/index.php?title=Plu...your_addon

All I did is click on the plugin source type of addon on the page you linked earlier.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
chippyash Offline
Senior Member
Posts: 130
Joined: Jan 2010
Reputation: 0
Location: Northants, UK
Post: #11
jmarshall Wrote:You mean like this:

Didn't see that one then!!! But thanks for the direct link Rolleyes

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
chippyash Offline
Senior Member
Posts: 130
Joined: Jan 2010
Reputation: 0
Location: Northants, UK
Post: #12
Nothing in what I've read so far explains (clearly) how to create an addon plugin script for XBMC.

Voinage's piece goes thorough a lot of code. This post initiator provides some links, but nowhere can I find a piece that says, in developer terms;

1/ This is how you structure an addon for music, video, scraper etc.
2/ This is how you setup your script and get it seen by XBMC so that it can be run and tested by the developer (i.e. Voinage's admirable piece completely skips that. he says to open up his script, but never where to put it so XBMC can see it)
3/ how to package your finished script so that it can be downloaded by others.

I'm coming at this from the POV of a seasoned PHP (and other OO languages) developer. Whilst I can dig my way through the idiosyncrasies of Python, the architectural issues are simply too much hard work. I want to code, not spend my time hunting in the dark.

So, Mr JMarshall (and all you other guys and girls there), should you wish to take up the challenge, please bombard me with annotated links to achieving this aim and I'll write a proper piece of documentation aimed at addon developers that will enable them to get up and running and part of the community as fast as possible. I reckon at least this way I won't need to spend the next three months tracking it down before I can do anything useful. Rolleyes

This is a bit off topic, JM, if you want to move it elsewhere, happy to do so. My offer is genuine.

BTW, if you want to see what a high standard of developer documentation looks like, see Zend Framework. It ain't perfect but it is coherent and consistent.

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
ppic Offline
Skilled Python Coder
Posts: 2,711
Joined: Feb 2009
Reputation: 11
Location: France idf
Post: #13
i've started with this voinage tutorial , and it still usefull to make plugin fast,.

all information you're seeking can be found on wiki / forum, just use addon , repository as keyword for add to official repo.

links to find most of what you need: http://forum.xbmc.org/forumdisplay.php?fid=26
check the pinned topics

[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)
(This post was last modified: 2010-09-06 23:21 by ppic.)
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #14
@chippyash - more than happy to assist.

A good start would be to grab the pydocs script - it's in Nuka's repository which you can add to XBMC here:

http://xbmc-addons.googlecode.com/svn/pa...addons.zip

Grab the pydocs script and run that - it'll generate the docs for the python API in XBMC, so you'll have docs on each function that XBMC exposes.

Once you have them, and we know exactly what it is you want to do (eg "I want to write a plugin that lists some videos on the interweb") then we can go from there.

Some good quality docs for this would be greatly appreciated.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
chippyash Offline
Senior Member
Posts: 130
Joined: Jan 2010
Reputation: 0
Location: Northants, UK
Post: #15
ppic Wrote:all information you're seeking can be found on wiki / forum, just use addon , repository as keyword for add to official repo.

links to find most of what you need: http://forum.xbmc.org/forumdisplay.php?fid=26
check the pinned topics

Right - that's just the sort of link info I'm looking for. Thanks. If other people contribute info in the same fashion, I can draw the threads of information together.

Thanks

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
Post Reply