Results 1 to 4 of 4

Thread: Getting Started with boxee API, for those new to XBMC + Python!

  1. #1
    Join Date
    Dec 2008
    Posts
    5

    Default Getting Started with boxee API, for those new to XBMC + Python!

    OK so maybe I was a little ambitous when I sat down at my PC after a few beers tonight and decided I'd have a play at using the boxee API to see how it worked.. but here is where I've got to so far.

    On MAC OSX, the simpliest way to add a plugin locally is to use the global path, as then you don't need to edit the sources.xml file somwhere, e.g. my music plugin is in a directory at

    /Applications/Boxee.app/Contents/Resources/Boxee/plugins/music/TEST

    Create a 128x128 png file and put in TEST/default.tbn
    Create a TEST/Default.py file for your python code
    Create a TEST/descriptor.xml as per http://developer.boxee.tv/app-descriptor/

    To get started with that.. I went here:
    http://members.cox.net/alexpoet/down...ython-XBMC.pdf

    Which allowed me to get hello world on screen, although for some reason with the "loading" spinner on top of it..

    I went back to the boxee API, to try to understand how that built on the XBMC API, and I was able to "import mc" the python API listed on the boxee page and start replacing the print "DEBUG" with mc.LogDebug("DEBUG") or mc.LogInfo("DEBUG").

    The debug output goes to
    ~/Library/Logs/boxee.log

    After getting through this, which does work, it was dawning on me that I think I was approaching this backwards, the "standard" way to develop boxee plugins appears to be to use the WindowXML format with embedded python against the specific onscreen controls, rather than python that embeds the creation of controls.. hopefully playing with this will make something that looks better and more consistent with the rest of boxee!

    Also contrary to my first assumption that the descriptor type "skin" is not just about overriding look and feel, but appears possibly synonymous with application.

    Anyone got any help tips for someone wanting to get started with this?
    Last edited by robcoles; April 9th, 2009 at 11:46 PM.

  2. #2
    Join Date
    Dec 2008
    Posts
    5

    Default Replying to myself.. is that a sign of madness ;-)

    OK.. so a bit more progress:

    Not sure if this is helpful or not.. but if you want to turn up the loglevel
    a bit ( and get Debug messages) aswell as onscreen FPS/version, then
    create ( if it does not exist )

    ~/Library/Application\ Support/BOXEE/UserData/advancedsettings.xml

    The following content brings it to debug level

    <advancedsettings>
    <loglevel>0</loglevel>
    </advancedsettings>

    See xbmc util/log.h for details on what number for which level, but 0 is the most verbose.

    So my Default.py now looks like this

    import xbmc, xbmcgui,mc,os

    class MyClass(xbmcgui.WindowXML):

    def onInit(self):
    # Display items here
    self.strAction = xbmcgui.ControlLabel(300, 200, 200, 200, "", "font14", "0xFF00FF00")
    self.addControl(self.strAction)
    self.strAction.setLabel("Hello world")

    mydisplay = MyClass("main.xml",os.getcwd(),"Default",False)
    mc.LogInfo("Music Done" )
    mydisplay.doModal()
    del mydisplay


    In have an xml file in [plugin]/resources/skins/Boxee\ Skin\ NG/720p/main.xml

    My page now loads and I see a DEBUG message in the log timing how long it took to load.

    For some reason the "busy" spinning dialog still shows on screen, suspect there is something I have to call to hide/stop it.. but not sure what!

  3. #3
    Join Date
    Dec 2008
    Posts
    5

    Default mc.HideDialogWait() kills the busy dialog.

    But unfortunately locks up the system subsequently! - think I'm still going about this, somewhat the wrong way.

  4. #4
    Join Date
    Apr 2009
    Posts
    13

    Default

    You can use show instead of doModal.

    window.show()

    I'm attacking a plugin the same way and am running into problems myself. Maybe you're way ahead of me at this point, but have you gotten the onInit() to work?

Similar Threads

  1. What happens next with the GUI API/Python API ?
    By Severus in forum boxee applications
    Replies: 5
    Last Post: January 4th, 2012, 04:15 AM
  2. Getting started with the Javascript API
    By transcendent in forum boxee applications
    Replies: 0
    Last Post: February 20th, 2011, 12:14 PM
  3. Setting texture from python API
    By samuil in forum boxee applications
    Replies: 2
    Last Post: January 3rd, 2011, 02:54 AM
  4. Focusing element from python API
    By samuil in forum boxee applications
    Replies: 3
    Last Post: November 25th, 2010, 05:03 AM
  5. Replies: 6
    Last Post: April 22nd, 2010, 10:48 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •