Skip to content

Commit 84a970b

Browse files
authored
Merge pull request #72 from paulchambaz/listallinfo
added listallinfo command
2 parents 42177f6 + 1bc1d05 commit 84a970b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/client.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,16 @@ impl<S: Read + Write> Client<S> {
198198
self.run_command("playlistinfo", ()).and_then(|_| self.read_structs("file"))
199199
}
200200

201-
/// lists all songs in the database
201+
/// Lists all songs in the database
202202
pub fn listall(&mut self) -> Result<Vec<Song>> {
203203
self.run_command("listall", ()).and_then(|_| self.read_structs("file"))
204204
}
205205

206+
/// Lists all songs in the database with metadata
207+
pub fn listallinfo(&mut self) -> Result<Vec<Song>> {
208+
self.run_command("listallinfo", ()).and_then(|_| self.read_structs("file"))
209+
}
210+
206211
/// Get current playing song
207212
pub fn currentsong(&mut self) -> Result<Option<Song>> {
208213
self.run_command("currentsong", ())
@@ -379,7 +384,7 @@ impl<S: Read + Write> Client<S> {
379384
// Database search {{{
380385
// TODO: count tag needle [...] [group] [grouptag], find type what [...] [window start:end]
381386
// TODO: search type what [...] [window start:end], searchadd type what [...]
382-
// TODO: listallinfo [uri], listfiles [uri]
387+
// TODO: listfiles [uri]
383388
// TODO: list type [filtertype] [filterwhat] [...] [group] [grouptype] [...]
384389
// TODO: searchaddpl name type what [...]
385390

0 commit comments

Comments
 (0)