diff options
Diffstat (limited to 'libmpd')
-rw-r--r-- | libmpd/database.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmpd/database.rb b/libmpd/database.rb index c88527c..e5f86b3 100644 --- a/libmpd/database.rb +++ b/libmpd/database.rb @@ -51,7 +51,10 @@ module MPDDatabase path = String.new end - return send_request(command).scan(/^file: (#{path}.+?)\n/).flatten + files = send_request(command) + files = files.gsub(/^directory: .+?\n/, '').sub(/^playlist: .+/m, '') + + return split_and_hash(files) end # Finds all songs in the database where _field_ contains _value_. |