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
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,662
Joined: Feb 2009
Reputation: 10
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: 24,520
Joined: Oct 2003
Reputation: 138
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
jmarshall Offline
Team-XBMC Developer
Posts: 24,520
Joined: Oct 2003
Reputation: 138
Post: #16
To get it to show up in XBMC you need an addon.xml and a python script file (named as per the library attribute in the xml file). These should be placed in a folder that has the same name as the id you provide in addon.xml in your addons folder (~/.xbmc/addons/).

If you want a minimal set of python code to start with, then I'm sure one of the kind folk here will be more than happy to provide it.

Perhaps there's a nice, international site that provides video links that we could use as a demonstration plugin, building it up from a simple list of a static item to a heirarchy. The key would be one that is accessible from anywhere in the world (i.e. no geocoding crap). Shoutcast could be used if we're happy for a music example - it's nice and easy.

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: #17
jmarshall Wrote:@chippyash - more than happy to assist.

Thanks Jonathan. If you could spread the word to other script devs to add pointers from their knowledge here that would be great.

I'll mash up something over the next couple of weeks. Where would you like it putting for review?

I don't really have a viewpoint of what I'm trying to produce program wise (well I do but it's not relevant.) I would really like to be able to produce something that all would be addon devs can use as a sure start to development.

One thing I am sure of, is that I don't want what I am doing to spread beyond scripting. I stopped C (C++, and any other variant) programming years ago, so the herculean task of trying to write the dev docs for the core, I'll leave to others better qualified. Nod

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
ppic Offline
Skilled Python Coder
Posts: 2,662
Joined: Feb 2009
Reputation: 10
Location: France idf
Post: #18
good idea jmarshall, now we have to find an international source to grab Big Grin

i'm pretty sure some webserie would be happy to be viewable like this !

[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
jmarshall Offline
Team-XBMC Developer
Posts: 24,520
Joined: Oct 2003
Reputation: 138
Post: #19
I suggest we start with something simple like shoutcast - Amet's script is nice and easy to follow, and by deconstructing it and building it up again step by step it would offer a nice tutorial.

We could then offer a separate tutorial for a video source.

@chippyash: Best thing to do is open a ticket on trac and attach what you've done. It might be possible to add some of it to the python wrapper in the XBMC sourcecode for instance so that the compiled docs contain more detail to get you up and running. Combined with a tutorial or two from an actual plugin being built from scratch and I think it would offer a quick start.

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: #20
jmarshall Wrote:I suggest we start with something simple like shoutcast - Best thing to do is open a ticket on trac and attach what you've done.

Sounds good to me. I've started creating the architecture of the document, so the next couple of weeks should see something viable. Just started a new contract today! I'm using Open Office doc. that OK with everyone?

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