当前位置: 首页>>代码示例>>PHP>>正文


PHP Catalog::get_videos方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:bl00m,项目名称:ampache,代码行数:9,代码来源:plex_xml_data.class.php

示例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);
 }
开发者ID:bl00m,项目名称:ampache,代码行数:13,代码来源:subsonic_api.class.php

示例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);
     }
//.........这里部分代码省略.........
开发者ID:nioc,项目名称:ampache,代码行数:101,代码来源:upnp_api.class.php


注:本文中的Catalog::get_videos方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。