Beispiel #1
0
 /**
  * getMusicDirectory
  * Get a list of all files in a music directory.
  * Takes the directory id in parameters.
  */
 public static function getmusicdirectory($input)
 {
     self::check_version($input);
     $id = self::check_parameter($input, 'id');
     $r = Subsonic_XML_Data::createSuccessResponse();
     if (Subsonic_XML_Data::isArtist($id)) {
         $artist = new Artist(Subsonic_XML_Data::getAmpacheId($id));
         Subsonic_XML_Data::addArtistDirectory($r, $artist);
     } else {
         if (Subsonic_XML_Data::isAlbum($id)) {
             $album = new Album(Subsonic_XML_Data::getAmpacheId($id));
             Subsonic_XML_Data::addAlbumDirectory($r, $album);
         }
     }
     self::apiOutput($input, $r);
 }