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
jmarshall Offline
Team-XBMC Developer
Posts: 26,228
Joined: Oct 2003
Reputation: 177
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,711
Joined: Feb 2009
Reputation: 11
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: 26,228
Joined: Oct 2003
Reputation: 177
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
chippyash Offline
Senior Member
Posts: 130
Joined: Jan 2010
Reputation: 0
Location: Northants, UK
Post: #21
Post deleted - not relevant

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!
(This post was last modified: 2010-09-07 12:19 by chippyash.)
find quote
chippyash Offline
Senior Member
Posts: 130
Joined: Jan 2010
Reputation: 0
Location: Northants, UK
Post: #22
Initial draft posted to issue tracker 10107

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
anarchintosh Offline
Senior Member
Posts: 282
Joined: Jul 2010
Reputation: 4
Post: #23
thanks for the documentation effort chippyash, .odt format opens just fine in the default text editor (TextEdit) on OS X

it'll be great to have a cohesive guide for developers

heres some info, i hope it helps:

debugging (you are probably aware of the articles, but ill post them just in case):
http://wiki.xbmc.org/index.php?title=HOW...on_Scripts
it would help if the info for adding the symlink is a bit clearer (not everyone uses linux)

http://wiki.xbmc.org/index.php?title=HOW...th_Eclipse
find quote
chippyash Offline
Senior Member
Posts: 130
Joined: Jan 2010
Reputation: 0
Location: Northants, UK
Post: #24
@anarchintosh
Thanks for the links - very helpful

Do you or anyone else know how to set up Netbeans to debug XBMC. The Python debugger in it works, but fails with a line

SOURCE::IMPORTERROR:No module named xbmcplugin['Traceback (most recent call last):

I guess I need to include some library path from somewhere but what, where and how, I don't know

ta

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!
(This post was last modified: 2010-09-09 11:28 by chippyash.)
find quote
chippyash Offline
Senior Member
Posts: 130
Joined: Jan 2010
Reputation: 0
Location: Northants, UK
Post: #25
I've finished draft 0.6 (essentially the finished article) of the doc which you can find in the tracker (previously mentioned in this thread.) If you have comments on fact or think something needs clarification, please let me know

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: #26
i've started to read it, good work so far !

[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
MacGyver Offline
Fan
Posts: 468
Joined: Jan 2007
Reputation: 2
Location: Weilerbach Germany
Post: #27
I have looked at a few scripts out there, but most span multiple files, are hard to follow without having 3 monitors and six .py files open across them.

Is there a simple single file script out there, that shows some examples of how the skins xml file and .py file work with each other to create the window/interface.

I tried the bootdisk.script, but that thing has to be the hardest thing to follow I have ever seen. I did manage to modify it to make a nice "Freeze XBMC when clicked" script though. Smile (sadly that was not my intention)


Something really simple like, enter a url, click a "Grab" button, and display text from a page in a text box on-screen, click "Exit" and it closes. In one .py file, with a few graphic elements.

Using a 2820FYKH0 Intel NUC, a Revo 1600, and two Foxconn NT-330i - All running OpenELEC. :)
find quote
MacGyver Offline
Fan
Posts: 468
Joined: Jan 2007
Reputation: 2
Location: Weilerbach Germany
Post: #28
So I added the google-code repository via "Install from zip", then I disabled it on accident.
I just thought I'd let you all know, maybe you should add a way to re-enable, disabled repositories. Smile I just removed it and re-installed it, but some people might have trouble doing it that way.

Thanks for the example docs, much better than the 6-year old ones I had for the XBOX.

Using a 2820FYKH0 Intel NUC, a Revo 1600, and two Foxconn NT-330i - All running OpenELEC. :)
find quote
chippyash Offline
Senior Member
Posts: 130
Joined: Jan 2010
Reputation: 0
Location: Northants, UK
Post: #29
MacGyver Wrote:So I added the google-code repository via "Install from zip", then I disabled it on accident.
I just thought I'd let you all know, maybe you should add a way to re-enable, disabled repositories. Smile I just removed it and re-installed it, but some people might have trouble doing it that way.

If what you are saying is correct then it's a bug and should go on the issue tracker. Try and replicate it. same result = problem

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: #30
ppic Wrote:i've started to read it, good work so far !

And?

Where can it be better elaborated?

Have I missed some important points (after all I've only been scripting XBMC/Python for 2 weeks!)

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