From 34a8e8b5048ca530addc781bfb96721bd23e9704 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Thu, 23 Jul 2009 23:00:56 -0700 Subject: The final new file for the time-being. --- libmpd/database.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 libmpd/database.rb (limited to 'libmpd') diff --git a/libmpd/database.rb b/libmpd/database.rb new file mode 100644 index 0000000..a1a6660 --- /dev/null +++ b/libmpd/database.rb @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +# +# Copyright 2009 David Vazgenovich Shakaryan +# Distributed under the terms of the GNU General Public License v3. +# See http://www.gnu.org/licenses/gpl.txt for the full license text. + +module MPDDatabase + # Find all songs in database with an exact match. + def find type, what + return split_and_hash send_request 'find %s "%s"' % [type, what] + end + + # Searches the database. + def search type, what + return split_and_hash send_request 'search %s "%s"' % [type, what] + end +end -- cgit v1.2.3-70-g09d2