Is there a Limit to VideoClipObjects in an ObjectContainer?

I'm am a noob to plug-in development and just started out creating a simple plugin that list a bunch of YouTube vids. I am simply creating a VideoClipObject for each one and adding it to an ObjectContainer.

 

oc = ObjectContainer(objects=[], view_group="VidList")
for link in links:
  title = "some title"
  video = VideoClipObject(
    title = title,        
    url = link
  )
  oc.add(video)

This works up to 115 videos but on the 116th one the view won't render. The logs look fine and show nothing wrong, the plugin log finishes with Response: [200] MediaContainer, 423170 bytes BUT on screen I get the the :( The channel is currently unavailable.

 

any ideas, is there a limit or am I hitting something else I'm not aware of.

 

thanks!

There is not a limit per se. More likely, the client is timing out while waiting for such a large list to be populated. I would suggest implementing some paging to separate the list into more manageable chunks. The NextPageObject allows you to (relatetively easily) add a call to grab more content and return it as a new page or on some clients allow for continuous scrolling. Here's an example of how it's implemented in the channel for Colbert Report.

ok thanks, this makes sense and paging the results was going to be the next step anyway so I'll give this a try.

one thing I noticed was that the layout of the container behaves differently on the page the moment I add NextPageObject to the container. It automatically started showing the icons of the VideoClipObject whereas prior it was not. I guess this is by design?

Thanks again!

one thing I noticed was that the layout of the container behaves differently on the page the moment I add NextPageObject to the container. It automatically started showing the icons of the VideoClipObject whereas prior it was not. I guess this is by design?

I guess so but, I'm not really clear on the logic behind that sort of behaviour.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.