Ejemplo n.º 1
0
 /**
  * getAlbum
  * Get details for an album, including a list of songs.
  * Takes the album id in parameter.
  */
 public static function getalbum($input)
 {
     self::check_version($input, "1.7.0");
     $albumid = self::check_parameter($input, 'id');
     $addAmpacheInfo = $input['ampache'] == "1";
     $album = new Album(Subsonic_XML_Data::getAmpacheId($albumid));
     if (empty($album->name)) {
         $r = Subsonic_XML_Data::createError(Subsonic_XML_Data::SSERROR_DATA_NOTFOUND, "Album not found.");
     } else {
         $r = Subsonic_XML_Data::createSuccessResponse();
         Subsonic_XML_Data::addAlbum($r, $album, true, $addAmpacheInfo);
     }
     self::apiOutput($input, $r);
 }