Saturday, June 1, 2013

Getting Started with xmbc Plugin Development


This blog was started by an xbmc neophyte to bring together information on how to write plugins for xbmc. It is presented from the perspective of a total beginner (which I am), with less than eight hours of Python experience, but with dozens of years of programming experience. While there is some information scattered about on how to write a plugin, most of the information is vague, scattered about in various places and written by someone who is more experienced and therefore leave out details which appear trivial but are critical to a proper understanding of the topic.Constructive criticism is welcome, with the aim of improving the content on this site. Also if someone has something substantive to contribute, please consider a guest post on this blog.


This bog is written with some  assumptions. For example, it is assumed that you already know a programming language, and know or can learn Python. Any experienced programmer should be able to pick up Python in a few minutes or hours,and  there are a number of excellent resources on the web to teach you Python. The aim of this blog is not to teach Python, but rather to document the APIs that are used to create a plugin. Likewise, it is assumed that you know how to use development tools, such as an IDE, and have some familiarity with debugging. Since a plugin is most often a web page scraper, it is also assumed that you understand HTML, and for some sites , JavaScript,

What you need

You will need to install Python, version 2.X (not 3!). I use version 2.7, any version between 2.4 and 2.7 will do. While you do not need an IDE, it really helps a lot. If you already have Eclipse installed (or even if you do not), Pydev is a good choice.
You will also need some API stub files. These files are not part of your plugins, but are referenced during development to provide documentation, code completion and allow scripts to be interpreted while running outside of the xbmc environment. I use the stubs found at Place these files anywhere on your system, and reference them in every project as part of the Python path:

We are now have everything needed to get started, so without further ado, let's write our first plugin

1 comment :

  1. Kodi-XBMC
    Kodi XBMC : everything you need to know for streaming : video streaming, video game streaming, music streaming, and much more.
    David M. McReynolds
    4921 Riverside Drive
    Dahlonega, GA 30533