X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=sbin%2Fid3fsd;h=b46706ad668480dc0cc08c19b1f9644fdb945aec;hb=a88823c2e87634d9fdad780b4923a839ba7e2d04;hp=983eafea2b7e99abd175dbceb04d427d514790a2;hpb=db5c2460d34783d162b2b6677e8768207bc1eaa8;p=id3fs.git diff --git a/sbin/id3fsd b/sbin/id3fsd index 983eafe..b46706a 100755 --- a/sbin/id3fsd +++ b/sbin/id3fsd @@ -10,16 +10,18 @@ use ID3FS::Fuse; 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); @@ -27,15 +29,16 @@ 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 ] [--] \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"); @@ -49,7 +52,7 @@ id3fsd - FUSE filesystem for browsing id3 tags =head1 SYNOPSIS -B [B<-vqh>] SI]> [B<-->] I I +B [B<-vh>] SI]> [B<-->] I I =head1 DESCRIPTION @@ -73,11 +76,7 @@ FIXME: better description, allow_others/fuse.conf, fstab, explain genre tag =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>