本文整理汇总了PHP中Catalog::get_videos方法的典型用法代码示例。如果您正苦于以下问题:PHP Catalog::get_videos方法的具体用法?PHP Catalog::get_videos怎么用?PHP Catalog::get_videos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Catalog
的用法示例。
在下文中一共展示了Catalog::get_videos方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setSectionAll_Movies
public static function setSectionAll_Movies(SimpleXMLElement $xml, Catalog $catalog)
{
self::setSectionAllAttributes($xml, $catalog, 'All Movies', 'movie');
$movies = Catalog::get_videos(array($catalog->id), 'movie');
foreach ($movies as $movie) {
$movie->format();
self::addMovie($xml, $movie);
}
}
示例2: getvideos
/**
* getVideos
* Get all videos.
* Takes no parameter.
*/
public static function getvideos($input)
{
self::check_version($input, "1.7.0");
$r = Subsonic_XML_Data::createSuccessResponse();
$videos = Catalog::get_videos();
Subsonic_XML_Data::addVideos($r, $videos);
self::apiOutput($input, $r);
}
示例3: _videoChilds
public static function _videoChilds($prmPath, $prmQuery, $start, $count)
{
$mediaItems = array();
$maxCount = 0;
$queryData = array();
parse_str($prmQuery, $queryData);
$parent = 'amp://video' . $prmPath;
$pathreq = explode('/', $prmPath);
if ($pathreq[0] == '' && count($pathreq) > 0) {
array_shift($pathreq);
}
switch ($pathreq[0]) {
case 'tvshows':
switch (count($pathreq)) {
case 1:
// Get tvshow list
$tvshows = Catalog::get_tvshows();
list($maxCount, $tvshows) = self::_slice($tvshows, $start, $count);
foreach ($tvshows as $tvshow) {
$tvshow->format();
$mediaItems[] = self::_itemTVShow($tvshow, $parent);
}
break;
case 2:
// Get season list
$tvshow = new TVShow($pathreq[1]);
if ($tvshow->id) {
$season_ids = $tvshow->get_seasons();
list($maxCount, $season_ids) = self::_slice($season_ids, $start, $count);
foreach ($season_ids as $season_id) {
$season = new TVShow_Season($season_id);
$season->format();
$mediaItems[] = self::_itemTVShowSeason($season, $parent);
}
}
break;
case 3:
// Get episode list
$season = new TVShow_Season($pathreq[2]);
if ($season->id) {
$episode_ids = $season->get_episodes();
list($maxCount, $episode_ids) = self::_slice($episode_ids, $start, $count);
foreach ($episode_ids as $episode_id) {
$video = new Video($episode_id);
$video->format();
$mediaItems[] = self::_itemVideo($video, $parent);
}
}
break;
}
break;
case 'clips':
switch (count($pathreq)) {
case 1:
// Get clips list
$videos = Catalog::get_videos(null, 'clip');
list($maxCount, $videos) = self::_slice($videos, $start, $count);
foreach ($videos as $video) {
$video->format();
$mediaItems[] = self::_itemVideo($video, $parent);
}
break;
}
break;
case 'movies':
switch (count($pathreq)) {
case 1:
// Get clips list
$videos = Catalog::get_videos(null, 'movie');
list($maxCount, $videos) = self::_slice($videos, $start, $count);
foreach ($videos as $video) {
$video->format();
$mediaItems[] = self::_itemVideo($video, $parent);
}
break;
}
break;
case 'personal_videos':
switch (count($pathreq)) {
case 1:
// Get clips list
$videos = Catalog::get_videos(null, 'personal_video');
list($maxCount, $videos) = self::_slice($videos, $start, $count);
foreach ($videos as $video) {
$video->format();
$mediaItems[] = self::_itemVideo($video, $parent);
}
break;
}
break;
default:
$mediaItems[] = self::_videoMetadata('clips');
$mediaItems[] = self::_videoMetadata('tvshows');
$mediaItems[] = self::_videoMetadata('movies');
$mediaItems[] = self::_videoMetadata('personal_videos');
break;
}
if ($maxCount == 0) {
$maxCount = count($mediaItems);
}
//.........这里部分代码省略.........