my $haspic=$file->haspic();
$artist=undef unless($self->ok($artist));
+ print "$self->{me}: $path: no artist tag defined\n" unless(defined($artist));
my $artist_id=$self->add_to_table("artists", $artist);
my $path_id=$self->add_to_table("paths", $pathpart);
$album=undef unless($self->ok($album));
+ if($self->{verbose} && !defined($album))
+ {
+ print "$self->{me}: $path: no album tag defined\n";
+ }
+
my $albums_id=$self->add_to_table("albums", $album);
my $file_id=$self->add_to_table("files", $filepart,
{ "artists_id" => $artist_id,
{
my ($self, $dir)=@_;
$dir=~s/^$self->{base}\/?//;
- print "Munged dir: $dir\n";
+# print "Munged dir: $dir\n";
my $sql=("SELECT files.name FROM files\n" .
"INNER JOIN paths ON files.paths_id=paths.id\n" .
"WHERE paths.name=?\n");
{
my($path, $id)=@$pathpair;
my $fullpath="$self->{absbase}/$path";
- print "PRUNING PATH $fullpath: ";
+# print "PRUNING PATH $fullpath: ";
unless(-d $fullpath)
{
push(@ids, $id)
sub prune_paths
{
my($self, @ids)=@_;
+ return unless(@ids);
my $sql=("DELETE FROM files WHERE paths_id IN (\n\t" .
join(', ', map { "\"$_\""; } @ids). "\n\t)");
print "SQL: \n", $sql, "\n";