diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-08-01 19:51:02 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-08-01 19:51:02 -0700 |
commit | 2a7a1fa600a9e99ccd7c80bfac0446313e51e01a (patch) | |
tree | 3096f8e6ed42f6a54d57182b41283ff2820d9941 /libmpd | |
parent | 1d6507fd00dd7f4ceef6b148a13d53ac39badef7 (diff) | |
download | ruby-libmpd-2a7a1fa600a9e99ccd7c80bfac0446313e51e01a.tar.gz ruby-libmpd-2a7a1fa600a9e99ccd7c80bfac0446313e51e01a.tar.xz |
Use lsinfo rather than listall.
Diffstat (limited to 'libmpd')
-rw-r--r-- | libmpd/database.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmpd/database.rb b/libmpd/database.rb index 3c114f6..c88527c 100644 --- a/libmpd/database.rb +++ b/libmpd/database.rb @@ -14,7 +14,7 @@ module MPDDatabase # Returns all directories. # If an argument is specified, list all subdirectories of that directory. def directories(uri=nil) - command = 'listall' + command = 'lsinfo' command << ' "%s"' % uri if uri if uri @@ -23,7 +23,7 @@ module MPDDatabase path = String.new end - return send_request(command).scan(/^directory: (#{path}[^\/]+?)\n/).flatten + return send_request(command).scan(/^directory: (#{path}.+?)\n/).flatten end # Counts the number of songs in the database where _field_ is _value_, as @@ -42,7 +42,7 @@ module MPDDatabase # Returns all files. # If an argument is specified, list all files in that directory. def files(uri=nil) - command = 'listall' + command = 'lsinfo' command << ' "%s"' % uri if uri if uri @@ -51,7 +51,7 @@ module MPDDatabase path = String.new end - return send_request(command).scan(/^file: (#{path}[^\/]+?)\n/).flatten + return send_request(command).scan(/^file: (#{path}.+?)\n/).flatten end # Finds all songs in the database where _field_ contains _value_. |