Index: /trunk/README
===================================================================
--- /trunk/README	(revision 18)
+++ /trunk/README	(revision 19)
@@ -1,4 +1,5 @@
-MP3::Find version 0.01
+MP3::Find version 0.04
 ======================
+
 DESCRIPTION
     This module allows you to search for MP3 files by their ID3 tags. You
@@ -7,4 +8,18 @@
     formatted string for each file using its ID3 tags, or the actual Perl
     data structure representing the results.
+
+    There are currently two backends to this module: MP3::Find::Filesystem
+    and MP3::Find::DB. You choose which one you want by passing its name as
+    the argument to you "use" statement; MP3::Find will look for a
+    MP3::Find::$BACKEND module. If no backend name is given, it will default
+    to using MP3::Find::Filesystem.
+
+    Note: I'm still working out some kinks in the DB backend, so it is
+    currently not as stable as the Filesystem backend.
+
+    Note the second: This whole project is still in the alpha stage, so I
+    can make no guarentees that there won't be significant interface changes
+    in the next few versions or so. Also, comments about what about the API
+    rocks (or sucks!) are appreciated.
 
 INSTALL
@@ -17,5 +32,6 @@
 
 SYNOPSIS
-        use MP3Find;
+        # select with backend you want
+        use MP3::Find qw(Filesystem);
     
         print "$_\n" foreach find_mp3s(
@@ -26,5 +42,5 @@
             },
             ignore_case => 1,
-            match_words => 1,
+            exact_match => 1,
             sort => [qw(year album tracknum)],
             printf => '%2n. %a - %t (%b: %y)',
@@ -32,7 +48,10 @@
 
 REQUIRES
-    File::Find, MP3::Info, Scalar::Util
+    File::Find, MP3::Info, and Scalar::Util are needed for the filesystem
+    backend (MP3::Find::Filesystem). In addition, if MP3::Tag is available,
+    you can search by explicit ID3v2 tag frames.
 
-    DBI and DBD::SQLite are needed if you want to have a database backend.
+    DBI, DBD::SQLite, and SQL::Abstract are needed for the database backend
+    (MP3::Find::DB).
 
 COPYRIGHT AND LICENSE
Index: /trunk/lib/MP3/Find.pm
===================================================================
--- /trunk/lib/MP3/Find.pm	(revision 18)
+++ /trunk/lib/MP3/Find.pm	(revision 19)
@@ -47,5 +47,5 @@
         },
         ignore_case => 1,
-        match_words => 1,
+        exact_match => 1,
         sort => [qw(year album tracknum)],
         printf => '%2n. %a - %t (%b: %y)',
@@ -77,5 +77,7 @@
 
 L<File::Find>, L<MP3::Info>, and L<Scalar::Util> are needed for
-the filesystem backend (L<MP3::Find::Filesystem>).
+the filesystem backend (L<MP3::Find::Filesystem>). In addition,
+if L<MP3::Tag> is available, you can search by explicit ID3v2
+tag frames.
 
 L<DBI>, L<DBD::SQLite>, and L<SQL::Abstract> are needed for the
@@ -184,6 +186,11 @@
 currently only uses the filesystem backend).
 
+L<mp3db> is a (currently rather barebones) command line 
+frontend for creating and updating a SQLite database for 
+use with L<MP3::Find::DB>.
+
 See L<MP3::Info> for more information about the fields you can
-search and sort on.
+search and sort on. See L<http://id3.org/> for information about
+ID3v2 tags.
 
 L<File::Find::Rule::MP3Info> is another way to search for MP3
Index: /trunk/lib/MP3/Find/DB.pm
===================================================================
--- /trunk/lib/MP3/Find/DB.pm	(revision 18)
+++ /trunk/lib/MP3/Find/DB.pm	(revision 19)
@@ -43,4 +43,8 @@
 );
 
+my $DEFAULT_STATUS_CALLBACK = sub {
+    my ($action_code, $filename) = @_;
+    print STDERR "$action_code $filename\n";
+};
 
 sub search {
@@ -89,6 +93,8 @@
 sub update_db {
     my $self = shift;
-    my $db_file = shift or croak "Need the name of the databse to update";
+    my $db_file = shift or croak "Need the name of the database to update";
     my $dirs = shift;
+    
+    my $status_callback = $self->{status_callback} || $DEFAULT_STATUS_CALLBACK;
     
     my @dirs = ref $dirs eq 'ARRAY' ? @$dirs : ($dirs);
@@ -126,10 +132,10 @@
         if (@$records == 0) {
             $insert_sth->execute(map { $mp3->{$$_[0]} } @COLUMNS);
-            print STDERR "A $$mp3{FILENAME}\n";
+            $status_callback->(A => $$mp3{FILENAME});
             $count++;
         } elsif ($mp3->{mtime} > $$records[0][0]) {
             # the mp3 file is newer than its record
             $update_sth->execute((map { $mp3->{$$_[0]} } @COLUMNS), $mp3->{FILENAME});
-            print STDERR "U $$mp3{FILENAME}\n";
+            $status_callback->(U => $$mp3{FILENAME});
             $count++;
         }
@@ -140,4 +146,5 @@
     foreach ($mtime_sth, $insert_sth, $update_sth) {
         $_->{RaiseError} = 0;  # don't die on error
+        $_->{PrintError} = 0;  # ...and don't even say anything
         $_->{Active} = 1;
         $_->finish;
@@ -150,5 +157,7 @@
     my $self = shift;
     my $db_file = shift or croak "Need the name of the databse to sync";
-    
+
+    my $status_callback = $self->{status_callback} || $DEFAULT_STATUS_CALLBACK;
+
     my $dbh = DBI->connect("dbi:SQLite:dbname=$db_file", '', '', {RaiseError => 1});
     my $select_sth = $dbh->prepare('SELECT FILENAME FROM mp3');
@@ -162,5 +171,5 @@
         unless (-e $filename) {
             $delete_sth->execute($filename);
-            print STDERR "D $filename\n";
+            $status_callback->(D => $filename);
             $count++;
         }
Index: /trunk/mkreadme
===================================================================
--- /trunk/mkreadme	(revision 18)
+++ /trunk/mkreadme	(revision 19)
@@ -1,4 +1,4 @@
 #!/bin/sh
-perl -I./lib -M$1 -e"\$ver = '$1 version ' . $1->VERSION; print qq[\$ver\\n] . '=' x length(\$ver) . qq[\\n]"
+perl -I./lib -M$1 -e"\$ver = '$1 version ' . $1->VERSION; print qq[\$ver\\n] . '=' x length(\$ver) . qq[\\n\\n]"
 
 PM_FILE=./lib/`echo $1 | sed 's/::/\//g'`.pm
Index: /trunk/t/03-db.t
===================================================================
--- /trunk/t/03-db.t	(revision 18)
+++ /trunk/t/03-db.t	(revision 19)
@@ -23,5 +23,7 @@
 # exercise the object
 
-my $finder = MP3::Find::DB->new;
+my $finder = MP3::Find::DB->new(
+    status_callback => sub {},  # be quiet about updates
+);
 isa_ok($finder, 'MP3::Find::DB');
 
