Work in Progress - Writing and Publishing Addons for XBMC

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Closed
Martijn Offline
Team-XBMC
Posts: 10,303
Joined: Jul 2011
Reputation: 154
Location: Dawn of time
Lightbulb  Writing and Publishing Addons for XBMC
Post: #1
Writing Addons for XBMC


Nope, i am not going to teach you how to create an add-on for XBMC,
But i'm going try to provide as much useful information as possible to get you going.

Since there's so much great and helpful posts on writing addons scattered across the forum,
the aim of this thread is to collect all of them in a single post.

Before you start
Think well through what addon you want to write. Start simple, learn how XBMC reacts and how to get things working and done.
Python is an easy to learn language and there is a lot of information available on the web on how to write scripts.
Dig yourself in some short python tutorials and start exploring the possibilities. Also know the difference between scripts and plugins.

XBMC wiki pages
The XBMC wiki pages is a valuable source of information to find specific examples on creating add-ons and how to use the XBMC python modules.
Be sure to start reading the Add-on development wiki to get you going.
There is also a more specific section about python development.
Some of these pages are a bit out of date and require updating but they should still provide the needed basics. Over time we will get these pages better organised.

Quick start
The best start to get going is just taking a small script that is already working and start figuring out how things are done. Change the name and add-on id that you can find in the addon.xml file and start tweaking it bit by bit until you created your own version. Just open the files included in the add-ons with a standard text editor (Notepad++ is recommended if your are using Windows.).
After you made the changes try running the add-on like you would with any other of that type.
Make sure you enable debugging so you can see in the Debug Log if any errors occur.

Here is a list of some simple script to get you started:
  • To be added

If you are planning to create an add-on with a custom UI (not for the faint-hearted) you can find some more information about skinning here.


Common mistakes:
Make sure you read this post to avoid the most common mistake made in xbmc addons:
http://forum.xbmc.org/showthread.php?tid=144677


Presenting your add-on
Once you're well on your way, you may want to present your add-on to the outside world for testing to make sure it runs well for others to on different platforms (some scripts can be limited to a single platform of course).
Like every piece of code, your add-on will contain bugs. to assist you in squashing as much bugs as possible, you can let others test your add-on.
Don't hesitate to start a thread in our Python development area and marking your add-ons as WIP.

Do however follow our no Piracy Policy.


Testing:
To get others to test your add-on there are several ways.
  • Providing the URL where the source code can be found and let users manually install this. For example your github repo (or other development repo).
  • Providing your add-on as a .zip file so users can use the "install from .zip" option in the XBMC add-on section. This greatly simplifies it for users that are not that familiar with how things work. You can provide the .zip file by uploading it to some hosting site (or Dropbox i.e.) where users can download it from.
  • Creating your own repository which users can install and can install your add-on from there. This however requires some more knowledge of the add-on dev to get this going.

XBMC has a large and active user-base who is willing to test drive your 'work in progress' add-on
and can help you identify those bugs.

Once things are running smoothly you can request your thread to moved to the appropriate add-on section or start a fresh one and get a MOD to close the old WIP one.
Once you are confident your add-ons works like it should you can request it to be added to the "XBMC.org official repo". Be sure to read the set guidelines on the wiki before submitting it. If you have any questions about these feel free to contact the repo maintainers. Also read this thread: HOW-TO get your addon into the official repository


Translations:
Our users can also help you to translate your add-on in every language XBMC supports.
All you have to do is to submit your English language file to our Transifex project. You can read more about this in the linked thread.


Submitting your add-on to the official XBMC.org repo
To make it easy for all XBMC users (not just the forum-goers) to install your add-on, we would appreciate it if you would submit your add-on to the official XBMC repository.
That way, it will be installable right from within XBMC for everyone.
To make the submission process as easy as possible we're providing a detailed list of guidelines for you to follow.


Keeping it up-to-date
Some add-on require more maintenance than others depending on what type. If you rely on internet pages you might find it that they regularly change their website which breaks the function of your add-on.
Try to find the most reliable way to keep maintenance and breakage down as much as possible. This makes it easier for you and for the users Smile
In case of changes on the website or you find bugs or simply want to add new features, make sure you test them as good as you can. Once that's done you can submit your updated add-on to XBMC.org official repo to distribute it amongst the users. Try to keep your updates to a minimum (once or twice a month for example) but of course don't hesitate to submit an update of your add-on to prevent breakage for users Smile

Buggalo
There's also a python module named Buggalo.
Quote:The buggalo script can collect various information about an
exception in a Python script as well as information about the
users system, such as XBMC and Python versions.

The collected information is then posted to the internet at a
predefined URL where the add-on author can investigate the exception.

The script is somewhat similar to posting the xbmc.log to pastebin,
but is more specialised and doesn't contain superfluous information.
It is also better integrated into the user experience, the user only
has to decide if they want to submit the bug report or not.

Read more about it here here.


Last but not least
should you ever, at any time, get stuck (we all hit the brick wall before)
feel free to ask for help in the Python Add-on Development forum.

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
(This post was last modified: 2014-01-30 16:35 by Martijn.)
find
da-anda Offline
Team-XBMC Member
Posts: 2,390
Joined: Jun 2009
Reputation: 36
Location: germany
Post: #2
I'd like to add that you should add a proper description. So if you're writing an addon for a video blog, don't just write something like "Videos of website XY". Describe what "website XY" is about so that people that never heard of it get an idea on what kind of videos to expect, if it requires an account on that site to watch, etc. As an example
Quote:XY is a website about this and a whole lot of that, with lot's of video tutorials to watch. This addon let's you watch the free tutorials as well as subscribers only content if you have a subscription.
find