Kodi Community Forum
Plugin and Script API documentation and other useful links for XBMC Addon Developers - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Plugin and Script API documentation and other useful links for XBMC Addon Developers (/showthread.php?tid=68337)

Pages: 1 2 3


Plugin and Script API documentation and other useful links for XBMC Addon Developers - rwparris2 - 2010-01-24

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/pycon/2007/idiomatic/handout.html#id10

A few useful libs for scraping websites:
http://pypi.python.org/pypi/simplejson/ (included in py2.6 + )
http://effbot.org/zone/pythondoc-elementtree-ElementTree.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.


- qwarlock - 2010-07-18

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.....


- ppic - 2010-07-18

ask the script author to update it first Wink


Addons/ Plugins - qwarlock - 2010-07-19

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!


- giftie - 2010-07-19

You might want to try replacing the xbmcplugin.getSetting() with xbmcaddon.getSetting()


- amet - 2010-07-19

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


Addons/ Plugins - qwarlock - 2010-07-19

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


- jmarshall - 2010-07-20

Nice - looking forward to see what you come up with Smile


- chippyash - 2010-09-05

[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.


- jmarshall - 2010-09-05

You mean like this:

http://wiki.xbmc.org/index.php?title=Plugin_Sources#What_XBMC_requires_for_your_addon

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

Cheers,
Jonathan


- chippyash - 2010-09-06

jmarshall Wrote:You mean like this:

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


Where is the info? - chippyash - 2010-09-06

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.


- ppic - 2010-09-06

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


- jmarshall - 2010-09-06

@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/packages/repository.googlecode.xbmc-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


- chippyash - 2010-09-06

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