Esempio n. 1
0
 /**
  * getPlaylist
  * Get the list of files in a saved playlist.
  * Takes the playlist id in parameters.
  */
 public static function getplaylist($input)
 {
     self::check_version($input);
     $playlistid = self::check_parameter($input, 'id');
     $r = Subsonic_XML_Data::createSuccessResponse();
     if (Subsonic_XML_Data::isSmartPlaylist($playlistid)) {
         $playlist = new Search(Subsonic_XML_Data::getAmpacheId($playlistid), 'song');
         Subsonic_XML_Data::addSmartPlaylist($r, $playlist, true);
     } else {
         $playlist = new Playlist($playlistid);
         Subsonic_XML_Data::addPlaylist($r, $playlist, true);
     }
     self::apiOutput($input, $r);
 }