Пример #1
0
 /**
  * getArtist
  * Get details fro an artist, including a list of albums.
  * Takes the artist id in parameter.
  */
 public static function getartist($input)
 {
     self::check_version($input, "1.7.0");
     $artistid = self::check_parameter($input, 'id');
     $artist = new Artist(Subsonic_XML_Data::getAmpacheId($artistid));
     if (empty($artist->name)) {
         $r = Subsonic_XML_Data::createError(Subsonic_XML_Data::SSERROR_DATA_NOTFOUND, "Artist not found.");
     } else {
         $r = Subsonic_XML_Data::createSuccessResponse();
         Subsonic_XML_Data::addArtist($r, $artist, true, true);
     }
     self::apiOutput($input, $r);
 }