HOW-TO:HelloWorld addon

From Official Kodi Wiki
Revision as of 13:24, 27 November 2014 by Zag (talk | contribs)
Jump to navigation Jump to search
Home icon grey.png   ▶ Development ▶ Add-on development ▶ Python development ▶ Python examples ▶ HOW-TO:HelloWorld addon


Introduction

This tutorial will explain how to write your first Kodi/XBMC Add-on!

Tools

I'd advise using a text editor for your first add-on, something like notepad++ or sublime are good due to their text syntaxing. Also make sure you have a version of Kodi installed on your development environment.

Installing

For this example we can install the official "Hello World" add-on that is in the repository. It is under: System >> Add-Ons >> Get Add-Ons >> All Add-ons >> Program Add-Ons

Testing

You can first give the add-on a test run by going to: System >> Add-Ons >> Enabled Add-Ons >> Program Add-Ons >> Hello World. You should now see a popup with 3 lines of text.

Modifying the Add-On

Each time we want to change the add-on you can simply go to the appdata folder and live edit it! No need to even close Kodi. This will allow you to quickly test your add-on modifications. On windows this will be in: C:\Users\user\AppData\Roaming\XBMC\addons\plugin.program.hello.world

Structure

addon.py <-- This is the actual python code for your Add-On

addon.xml <-- This is the Add-Ons metadata

changelog.txt <-- This is a text file with any changelog information in it. We advise updating this on each release.

icon.png <-- A PNG icon for the add-on. It can be 256x256 or 512x512 pixels big. Try to make it look nice!

LICENSE.txt <-- Another text file with the Add-On license text.