summaryrefslogtreecommitdiff
path: root/libmpd/database.rb
diff options
context:
space:
mode:
Diffstat (limited to 'libmpd/database.rb')
-rw-r--r--libmpd/database.rb5
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_.