use vars qw($me);
$me=($0=~/(?:.*\/)?(.*)/)[0];
+our $VERSION="1.00";
my $verbose=0;
my $help=0;
my $dbpath=undef;
+my $tagdepth=undef;
Configure(qw(bundling no_ignore_case));
my $optret=GetOptions(
- "verbose|v" => \$verbose,
- "quiet|q" => sub { $verbose=0; },
+ "verbose|v" => sub { $verbose++; },
"help|h" => \$help,
"database|f=s" => \$dbpath,
+ "t|tagdepth=s" => \$tagdepth,
);
usage() if(scalar(@ARGV) != 2 || !$optret || $help);
my $source=shift;
my $mountpoint=shift;
-my $db=ID3FS::DB->new($me, $dbpath, $source);
-my $fuse=ID3FS::Fuse->new($db, $source, $mountpoint, $verbose);
+my $db=ID3FS::DB->new($me, $verbose, 0, $dbpath, $source);
+exit unless($db);
+
+my $fuse=ID3FS::Fuse->new($db, $source, $mountpoint, $verbose, $tagdepth);
$fuse->run();
sub usage
{
die("Usage: $me [-vqh] [-f <dbfile>] [--] <sourcedir> <mountpoint>\n".
- " -v\t\t\tVerbose\n".
- " -q\t\t\tQuiet (default)\n".
+ " -v\t\t\tVerbose (repeat for more verbosity)\n".
" -h\t\t\tThis help\n".
" -f|--database=FILE\tPath to database file\n" .
" --\t\t\tEnd of options\n");
=head1 SYNOPSIS
-B<id3fsd> [B<-vqh>] S<B<[-f >I<dbfile>]> [B<-->] I<SOURCEDIR> I<MOUNTPOINT>
+B<id3fsd> [B<-vh>] S<B<[-f >I<dbfile>]> [B<-->] I<SOURCEDIR> I<MOUNTPOINT>
=head1 DESCRIPTION
=item B<-v>
-Enable verbose operation.
-
-=item B<-q>
-
-Quiet (no output). This is the default.
+Enable verbose operation. Repeat for more verbosity.
=item B<-h>