Plugin and Script API documentation and other useful links for XBMC Addon Developers
#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
Reply
#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!
Reply
#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 !
Reply
#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
Reply
#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!
Reply
#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!
Reply
#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!
Reply
#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
Reply
#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!
Reply
#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!
Reply
#26
i've started to read it, good work so far !
Reply
#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 NUC7PJYHN and a 2820FYKH0 Intel NUC running LibreELEC, and two FireTVs.:)
Reply
#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 NUC7PJYHN and a 2820FYKH0 Intel NUC running LibreELEC, and two FireTVs.:)
Reply
#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!
Reply
#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!
Reply

Logout Mark Read Team Forum Stats Members Help
Plugin and Script API documentation and other useful links for XBMC Addon Developers2