Posted on July 25, 2011.

If you’re not familiar with XBMC, it’s open-source media center software. One of the coolest features of XBMC, is its addon structure. Addons enable watching web based content (think YouTube) within the interface of XBMC. So, when you’re sitting on your couch, you don’t have to manipulate a mouse and a web browser, you can continue to use the simple XBMC interface.

There are a lot of plugins currently available. Some of them are for sites such as YouTube, Vimeo, the US Cable stations, Academic Earth (self plug!) and many more. The plugins are written in Python, and there is a huge development community (outside of the XBMC core devs), that build these plugins.

XBMC has a plugin browser and installer bundled within the application. This makes it seamless to install new plugins into XBMC. However, there is no simple way to see a list of official addons outside of XBMC. All of the plugins are contributed to a git repository, so you can browse the gitweb UI (which is pretty ugly). Also, a lot of the plugin writers have tried to update a wiki page. However, wikis tend to be outdated the second they are saved (especially since the plugin branch gets updated 4-5 times a day).

So, I was inspired by this post in the XBMC forums to try to make some sort of auto-updating web application based on the git repositories. I came up with

It’s a static website that gets updated every hour from the official git repository. You can filter plugins by type (Video, Audio, etc.) or by available languages. You can also sort the plugins by name, type or last updated date. For each plugin the name and icon is displayed by default. If you click on an icon, the view toggles and shows lots of information about the plugin. If there are multiple translations of the description, those are shown as well.

All of the code is written in python. A quick summary of the code:

  1. Do a git pull on the plugins branch and check for any updates.
  2. Crawl all of the plugin folders on disk, and extract metadata from each plugin’s addon.xml.
  3. Create the HTML for the addon browser using jinja2 templates and substituting all the plugin information found in step 2.
  4. Copy over the icon.png‘s for each of the addons and optimize using Google’s page speed img_optimize_bin.
  5. Publish everything use fabric to the public web directory being served by nginx.

You can find the code on github.

Ultimately, I think this would be cool if it became polished enough for others to use. There are many developers who have plugins that aren’t committed to the official repository for one reason or another (illegal in US, adult content). I think it would be neat if developers who hosted their own repos could simply run a version of this project to display their own addons.