I'm new to programming for XBMC [Basics]

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
GlidePy Offline
Junior Member
Posts: 2
Joined: Dec 2013
Reputation: 0
Post: #1
I'm trying to create a basic plugin which plays livestreams.
I know the basics of Python but I have more experience with C# and JS.

The main problem is I can't even seem to get started (The documentation is confusing).
http://mirrors.xbmc.org/docs/python-docs/12.2-frodo/ Half the links on the this page seems to not work for me.
Most plugins for XBMC use the default GUI to make a list, but what is the API to use the default GUI?

Also how would I play a stream after clicking on a button on the list?

Please help.
(This post was last modified: 2013-12-09 02:43 by GlidePy.)
find quote
bossanova808 Offline
Donor
Posts: 2,180
Joined: Sep 2009
Reputation: 32
Location: Melbourne, Australia
Post: #2
Easiest way to learn is to download a versy simple addon then copy it.

If you're just doing a basic video plugin, you could use the xbmcswift2 framework

...which seems to be quite well documented:
http://www.xbmcswift.com/en/latest/

My XBMC stuff:
find quote
GlidePy Offline
Junior Member
Posts: 2
Joined: Dec 2013
Reputation: 0
Post: #3
I was trying to find a simple addon but it seems every addon (that I could find) is pretty complex, because they connect to the internet to retrieve lists.

Also I'm not completely sure how to use the xbmcswift framework.

I know creating a list looks something like this:
Code:
def CATEGORIES():
      addDir("","",1,"")
      addDir( "","",1,"")
      addDir( "","",1,"")
      addDir("","",1,"")
But the documentation is confusing. Do I have to use a URL? How do I "link" each button to a class? (The class will tell XBMC to stream)
(This post was last modified: 2013-12-09 03:19 by GlidePy.)
find quote
foomanshoe Offline
Junior Member
Posts: 13
Joined: Nov 2013
Reputation: 1
Post: #4
I also just started with xbmc addon development. I already know python quite well, but I agree, it was confusing to start. xbmcswift2 makes it much easier and more pythonic than the default api. I would start there. Feel free to take a look at my project which is also a very simple video addon that scrapes video urls and sends them to xbmc. https://bitbucket.org/boralyl/plugin.vid...s/overview

Also, here are some of the bulitin modules developed by the xbmc team (for reference): https://github.com/XBMC-Addons/

Additionally I agree with bossanova808. xbmcswift2 has very good documentation with a great tutorial. Read up here: http://www.xbmcswift.com/en/latest/
(This post was last modified: 2013-12-09 06:10 by foomanshoe.)
find quote
Talguy Online
Senior Member
Posts: 145
Joined: Sep 2010
Reputation: 0
Post: #5
Guys, I'm also thinking of starting to create plugins for XBMC. I want to create a stream audio plugin. Is it possible to have the plugin use XBMC's now playing screen while running the addon in XBMC's background. I would like to do it this way as i want to listen to music from a service while still being able to browse my library and get it organized. Is this possible?

Sorry for the thread jack
find quote
Bstrdsmkr Offline
Posting Freak
Posts: 803
Joined: Oct 2010
Reputation: 17
Post: #6
(2014-01-02 16:51)Talguy Wrote:  Guys, I'm also thinking of starting to create plugins for XBMC. I want to create a stream audio plugin. Is it possible to have the plugin use XBMC's now playing screen while running the addon in XBMC's background. I would like to do it this way as i want to listen to music from a service while still being able to browse my library and get it organized. Is this possible?

Sorry for the thread jack

If what you want to stream is already available, you don't need a separate addon for this. Just hit tab on your keyboard when something is playing and you can access all the other menus and etc

What is likely confusing the OP and the rest is that there are two "styles" of video addon:
  1. Create a list of stuff and pass it off to xbmc to handle the looks
    • Each item in you lists does one of two things

      1. Play an item or
      2. Re-launch your plugin and pass some special parameters in. In this case, your plugin should examine the parameters and create a new list of stuff based on them. This new list also does one of these two things, lather, rinse, repeat until the user selects one that plays an item.
  • Create your own gui from the ground up and get pretty much total control of everything (for better or worse)
    • This can make for some awesome plugins, but also takes much more work

  • Hope that helps
    (This post was last modified: 2014-01-02 18:22 by Bstrdsmkr.)
    find quote