Results 1 to 10 of 10

Thread: Dynamic content list

  1. #1
    Join Date
    Apr 2010
    Posts
    6

    Default Dynamic content list

    Hi,

    I'm trying to build a small app to view content from a webpage that does not have have rss support. I've scrappers ready & able to login by posting params.

    I dont see any example which manages a list with dynamic content. All the apps have contentURL set to rss. I need some examples for this. It would have been nice to have python class that I can derive & override to get content . -- something like

    listitem.setContent(myContentClass)
    myContentClass will have interface for next/prev/first last etc..

    Also most examples have no onclick events specified for a list item. ..

    Any info on this would be of great help
    Thanks
    prem

  2. #2

    Default

    you can dynamically create a rss feed and then have the contentURL grab that.

    if you need some help to create a RSS feed its pretty simple.

    with some php/mysql knowledge you can create it pretty easy.

    test your app grabbing a .rss feed and Zip it up and load here so we can test it.

    and then i can show you how to have it grab a RSS feed you generate.

    we can set the parameters to check the mysql DB by the following

    1.) user
    2.) users local time
    3.) user permissions you set.


    How often will it check the rss feed? Not sure but can this be made to check every say 30 minutes?

  3. #3
    Join Date
    Aug 2008
    Location
    Cleveland, OH
    Posts
    3,712

    Default

    You can do this in Python:
    Code:
    <onload lang="python"><![CDATA[
    mc.ShowDialogWait()
    
    contentList = mc.GetActiveWindow().GetList(100)
    itemList = mc.ListItems()
    item = mc.ListItem( mc.ListItem.MEDIA_VIDEO_OTHER )
    
    item.SetTitle('Test Item')
    
    itemList.append(item)
    contentList.SetItems(itemList)
    
    mc.HideDialogWait()
    ]]></onload>
    Here is a list of item properties:
    http://developer.boxee.tv/Listitem_Class
    personal: boxee | twitter | boxee hq
    boxee: boxee chat | boxee wiki | boxee plugins

    i run boxee 0.9.20 on: ubuntu 9.10, windows xp sp3 (virtual machine), windows 7 and a neuros link hacked to all hell.

    what super powers does a 'super mod' have? the 'super ban'... that, and laser vision.

  4. #4
    Join Date
    Apr 2010
    Posts
    6

    Default

    Chad,

    Php was what I'm trying to avoid. I'm familiar with php , that is not a problem. I've to have a webserver up & running just for this. I'm developing the app for my apple tv, which is already resource constrained. I dont want to have another machine running just because I want to watch TV. Both cases of browsing & search needs pagination , which would be simple with rss. The list controls seem to do pagination comfortably with rss .I'm just trying to see if I can implement it without rss.

    This is another idea I had: spawning a python http server at app start.at a specific port which would serve me the rss with params I give it. But from the boxee docs , I was not sure how long the server can be kept running & when it would shutdown. It would be nice if Boxee provided a framework for that.

  5. #5
    Join Date
    Apr 2010
    Posts
    6

    Default

    Quote Originally Posted by agentlame View Post
    You can do this in Python:
    Code:
    <onload lang="python"><![CDATA[
    mc.ShowDialogWait()
    
    contentList = mc.GetActiveWindow().GetList(100)
    itemList = mc.ListItems()
    item = mc.ListItem( mc.ListItem.MEDIA_VIDEO_OTHER )
    
    item.SetTitle('Test Item')
    
    itemList.append(item)
    contentList.SetItems(itemList)
    
    mc.HideDialogWait()
    ]]></onload>
    Here is a list of item properties:
    http://developer.boxee.tv/Listitem_Class
    agentlame,

    i understand the simple case of adding one item to the list. The web page I'm scrapping is paginated. at onload , I'll grab the first page.I want to fetch the second page only if I need to( say I'm scrolling & out of items to be displayed) . Which call event should I need to define for this.

  6. #6
    Join Date
    Aug 2008
    Location
    Cleveland, OH
    Posts
    3,712

    Default

    Quote Originally Posted by premkumar View Post
    agentlame,

    i understand the simple case of adding one item to the list. The web page I'm scrapping is paginated. at onload , I'll grab the first page.I want to fetch the second page only if I need to( say I'm scrolling & out of items to be displayed) . Which call event should I need to define for this.
    Something like this should work:
    Code:
    <ondown lang="python"><![CDATA[
    if len(itemList) == contentList.GetFocusedItem():
    	populate_next_page() #method that gets next page and populates list.
    ]]></onload>
    You would put this in the <ondown> of your list control.
    Last edited by agentlame; April 29th, 2010 at 03:00 PM. Reason: mistakes
    personal: boxee | twitter | boxee hq
    boxee: boxee chat | boxee wiki | boxee plugins

    i run boxee 0.9.20 on: ubuntu 9.10, windows xp sp3 (virtual machine), windows 7 and a neuros link hacked to all hell.

    what super powers does a 'super mod' have? the 'super ban'... that, and laser vision.

  7. #7

    Default

    ahh sorry i thought you were using a certain website cause you mentioned Login.


    my bad

  8. #8
    Join Date
    Apr 2010
    Posts
    6

    Default

    Quote Originally Posted by agentlame View Post
    Something like this should work:
    Code:
    <ondown lang="python"><![CDATA[
    if len(itemList) == contentList.GetFocusedItem():
    	populate_next_page() #method that gets next page and populates list.
    ]]></onload>
    You would put this in the <ondown> of your list control.
    This is nice . I'll work on it today ...

  9. #9
    Join Date
    Aug 2008
    Location
    Cleveland, OH
    Posts
    3,712

    Default

    You know what, I'm a moron.

    That <ondown> will not fire until you're at the end of your list--not on eash down press IN the list--so you should actually be fine with:
    Code:
    <ondown lang="python"><![CDATA[
    populate_next_page() #method that gets next page and populates list.
    ]]></onload>
    personal: boxee | twitter | boxee hq
    boxee: boxee chat | boxee wiki | boxee plugins

    i run boxee 0.9.20 on: ubuntu 9.10, windows xp sp3 (virtual machine), windows 7 and a neuros link hacked to all hell.

    what super powers does a 'super mod' have? the 'super ban'... that, and laser vision.

  10. #10
    Join Date
    Apr 2010
    Posts
    6

    Default

    I just added it to the ondown of the panel , which fires when I'm at the last row & click down. Works fine . Soon I'ld like to emulate the same behaviour as one with rss. - where it preloads next set of results when you are at the last but one row.

Similar Threads

  1. Dynamic <content> URLs
    By phikai in forum boxee applications
    Replies: 5
    Last Post: March 16th, 2011, 07:34 AM
  2. how to set content to list container
    By huanghao1120 in forum boxee applications
    Replies: 2
    Last Post: November 12th, 2010, 04:19 PM
  3. list control can't get content messages
    By huanghao1120 in forum boxee applications
    Replies: 1
    Last Post: November 4th, 2010, 07:44 AM
  4. List of High Definition Content In Boxee
    By Kiggold in forum announcements
    Replies: 11
    Last Post: March 21st, 2010, 08:16 AM
  5. Unable to use code in list control content section
    By xarragon in forum boxee applications
    Replies: 3
    Last Post: February 27th, 2010, 05:44 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
  •