Results 1 to 8 of 8

Thread: python help

  1. #1
    Join Date
    Jan 2011
    Location
    St. Petersburg, Russia
    Posts
    13

    Default python help

    So im coding this app and i need some help as my cod dosent work when i try and click on anything nothing happens

    Code:
    <onclick lang="python"><![CDATA[
    list = mc.GetWindow(14000).GetList(100)
    listitems = list.GetItems()
    listitem = listitems[list.GetFocusedItem()]
    if ".xml" in list.GetPath():
    browse = mc.GetWindow(14000).GetList(100)
    browse.SetContentURL(listitem.GetPath())
    mc.GetActiveWindow().PushState()
    mc.GetWindow(14000).GetControl(100).SetVisible(True)
    mc.GetWindow(14000).GetControl(100).SetFocus()
    elseif ".mp4" in listitem.GetPath()
    mc.ShowDialogNotification("YEWWWW")
    
    ]]>

    Boxee Setup:
    AMD Neo 1.66 GHz Cold CPU
    ATI Radeon HD 3200
    HDMI (1080p with audio)
    4GB DDR3 RAM
    802.11n WiFi
    Samsung 42" Full HD LCD
    Boxee Remote

  2. #2

    Default

    Don't think your tabs are right
    ~Kai
    Website: http://kaiarmstrong.com
    Twitter: @phikai
    Boxee Development: Think One Zero Boxee Development - Feel free to donate here to help support it!
    Twitter: @ThinkOneZero - Support/News/Updates/Statues about Think One Zero Services

  3. #3
    Join Date
    Jan 2011
    Location
    St. Petersburg, Russia
    Posts
    13

    Default

    Quote Originally Posted by phikai View Post
    Don't think your tabs are right
    Ive got teh app working buy i want to be able to tell what path is a video path and whats an xml path if that makes sence?

    Boxee Setup:
    AMD Neo 1.66 GHz Cold CPU
    ATI Radeon HD 3200
    HDMI (1080p with audio)
    4GB DDR3 RAM
    802.11n WiFi
    Samsung 42" Full HD LCD
    Boxee Remote

  4. #4

    Default

    This is a similar type of code...based on a menu of RSS feeds...

    Code:
    list = mc.GetWindow(14000).GetList(111)
    listitems = list.GetItems()
    listitem = listitems[list.GetFocusedItem()]
    params = mc.Parameters()
    params["link"] = str( listitem.GetPath() )
    linktype = params["link"].split('://')
    if (linktype[0] == "rss"):
        mc.GetWindow(14000).PushState()
        mc.GetWindow(14000).GetList(111).SetContentURL( params["link"])
    else:
    	mc.GetPlayer().Play(listitem)
    ~Kai
    Website: http://kaiarmstrong.com
    Twitter: @phikai
    Boxee Development: Think One Zero Boxee Development - Feel free to donate here to help support it!
    Twitter: @ThinkOneZero - Support/News/Updates/Statues about Think One Zero Services

  5. #5
    Join Date
    Jan 2010
    Posts
    22

    Default

    Anyway I think the line

    if ".xml" in list.GetPath():

    should be listitem.GetPath.

  6. #6
    Join Date
    Jan 2011
    Location
    St. Petersburg, Russia
    Posts
    13

    Default

    Quote Originally Posted by phikai View Post
    This is a similar type of code...based on a menu of RSS feeds...

    Code:
    list = mc.GetWindow(14000).GetList(111)
    listitems = list.GetItems()
    listitem = listitems[list.GetFocusedItem()]
    params = mc.Parameters()
    params["link"] = str( listitem.GetPath() )
    linktype = params["link"].split('://')
    if (linktype[0] == "rss"):
        mc.GetWindow(14000).PushState()
        mc.GetWindow(14000).GetList(111).SetContentURL( params["link"])
    else:
    	mc.GetPlayer().Play(listitem)

    My problem with that is my rss feed is a http://dys0n-media.tk/rss/feeds/x.xml etc so its not rss://

    Boxee Setup:
    AMD Neo 1.66 GHz Cold CPU
    ATI Radeon HD 3200
    HDMI (1080p with audio)
    4GB DDR3 RAM
    802.11n WiFi
    Samsung 42" Full HD LCD
    Boxee Remote

  7. #7

    Default

    Quote Originally Posted by dys0n View Post
    My problem with that is my rss feed is a http://dys0n-media.tk/rss/feeds/x.xml etc so its not rss://
    ya, just change them in the XML to be rss:// it'll be fine
    ~Kai
    Website: http://kaiarmstrong.com
    Twitter: @phikai
    Boxee Development: Think One Zero Boxee Development - Feel free to donate here to help support it!
    Twitter: @ThinkOneZero - Support/News/Updates/Statues about Think One Zero Services

  8. #8
    Join Date
    Jan 2011
    Location
    St. Petersburg, Russia
    Posts
    13

    Default

    It dosent seem to work when i click on the list nothing happens it stays the same i have cahnged the list number to my list id but nothing happens...
    Last edited by dys0n; January 30th, 2011 at 06:05 PM.

    Boxee Setup:
    AMD Neo 1.66 GHz Cold CPU
    ATI Radeon HD 3200
    HDMI (1080p with audio)
    4GB DDR3 RAM
    802.11n WiFi
    Samsung 42" Full HD LCD
    Boxee Remote

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
  •