“Hello World!” with KODI
I wanted to use the last couple of days before its back to work to take a brief look into the world of xbmc (now KODI!) addon development.
This post describes how one goes about writing and running the obligatory “hello world!” program with KODI.
The addon language of choice in KODI world is python, and it brings its own interpreter. I will use pycharm as an IDE.
What you need
-
KODI - A media center software which will act as the addons host. howto install KODI in your linux distro of choice is described here.
-
A Texteditor or IDE. Popular ones for Python are Pycharm, Jetbrains take at a Python IDE, or the Eclipse based PyDev.
-
xbmcstubs - a set of python files which provide method stubs for the libraries included in KODI’s python interpreter.
Other useful resources
-
Audio/video add-on tutorial on KODI wiki.
How to do it
Project structure
The addon directory must have the same name as the addon itself, which will be named io.github.lumue.xbmc.hello
.
to be available to KODI it must be placed in $HOME/.kodi/addons
and contain at least these two files:
-
addon.xml
addon metadata -
addon.py
the addon python script