public static function getList() { // get the list $result = Music::send('listallinfo'); // return the values return Music::buildSongList($result['values']); }
/** * Get all the songs for an artist * * @param string $artist * * @return array */ public static function getSongs($artist) { // query the MPD database $result = Music::send('search', 'artist', $artist); // get the list of songs return Music::buildSongList($result['values']); }
public static function getSongs($playlist) { // send the command to MPD $results = Music::send('listplaylistinfo', $playlist); // return the list of songs return Music::buildSongList($results['values']); }
/** * Get the list of songs for a genre, artist, and album * * @param string $genre * @param string $artist * @param string $album * @return array */ public static function getSongs($genre, $artist, $album) { // query the MPD database if ($album) { $result = Music::send('search', 'genre', $genre, 'artist', $artist, 'album', $album); } else { $result = Music::send('search', 'genre', $genre, 'artist', $artist); } // get the list of songs return Music::buildSongList($result['values']); }