Jump to content

These Forums Are Now Read-Only

For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Selecting a video less than or equal to ** seconds in length

  • Please log in to reply
1 reply to this topic

#1 Austin Chase

Austin Chase


  • Members
  • Pip
  • 1 posts

Posted 02 December 2010 - 02:03 AM

i'm using TubePress in WordPress 3.0.2 ... very awesome, btw ... and need to select videos from YouTube to display, which are only 140 seconds in length or less.

Where/how could i integrate this option in TubePress so that it also shows up as an option in the admin panel of wordpress under "which videos?"

YouTube API supports this (length) if am not mistaken:

The tag specifies the duration of a video in seconds.

Could this yt: duration <=2:20 be included in TubePress as an option to select videos that are less than or equal to 140 seconds for a gallery?

#2 eric


    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 02 December 2010 - 12:53 PM

Feature requests are always welcome: http://code.google.c...issu... request. Features with the most votes will be implemented first. It's a reasonably fair way to get things into the implementation schedule.

If you feel like doing a little hacking of your own, I'd point you to edit tubepress/classes/org/tubepress/video/factory/impl/YouTubeVideoFactory.class.php. In the "_buildVideos" private function you'll see a foreach loop where we go over each video and decide if we want to include it in the gallery. You could add a conditional clause there that looks at the yt:duration element of the raw XML.

Hope this helps.