Skip to content

Commit

Permalink
Merge pull request #72 from paulchambaz/listallinfo
Browse files Browse the repository at this point in the history
added listallinfo command
  • Loading branch information
kstep authored Nov 30, 2024
2 parents 42177f6 + 1bc1d05 commit 84a970b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,16 @@ impl<S: Read + Write> Client<S> {
self.run_command("playlistinfo", ()).and_then(|_| self.read_structs("file"))
}

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

/// Lists all songs in the database with metadata
pub fn listallinfo(&mut self) -> Result<Vec<Song>> {
self.run_command("listallinfo", ()).and_then(|_| self.read_structs("file"))
}

/// Get current playing song
pub fn currentsong(&mut self) -> Result<Option<Song>> {
self.run_command("currentsong", ())
Expand Down Expand Up @@ -379,7 +384,7 @@ impl<S: Read + Write> Client<S> {
// Database search {{{
// TODO: count tag needle [...] [group] [grouptag], find type what [...] [window start:end]
// TODO: search type what [...] [window start:end], searchadd type what [...]
// TODO: listallinfo [uri], listfiles [uri]
// TODO: listfiles [uri]
// TODO: list type [filtertype] [filterwhat] [...] [group] [grouptype] [...]
// TODO: searchaddpl name type what [...]

Expand Down

0 comments on commit 84a970b

Please sign in to comment.