From a0afb2205afd4fe0ca1e5c52970ccdddc4358f61 Mon Sep 17 00:00:00 2001 From: Ian Beckwith Date: Tue, 19 Oct 2010 15:41:32 +0100 Subject: [PATCH] handle FIXMEs, remove dead code --- lib/ID3FS/AudioFile.pm | 2 +- lib/ID3FS/AudioFile/Flac.pm | 2 +- lib/ID3FS/AudioFile/Mp3.pm | 2 +- lib/ID3FS/AudioFile/Ogg.pm | 2 +- lib/ID3FS/DB.pm | 7 ------- lib/ID3FS/Path.pm | 44 -------------------------------------------- sbin/id3fsd | 2 +- 7 files changed, 5 insertions(+), 56 deletions(-) diff --git a/lib/ID3FS/AudioFile.pm b/lib/ID3FS/AudioFile.pm index 394a1c5..bb91604 100644 --- a/lib/ID3FS/AudioFile.pm +++ b/lib/ID3FS/AudioFile.pm @@ -74,7 +74,7 @@ sub audiotype sub haspic { - return undef; # FIXME + return undef; # NEXTVERSION # my $self=shift; # return $self->{audiofile}->haspic(); } diff --git a/lib/ID3FS/AudioFile/Flac.pm b/lib/ID3FS/AudioFile/Flac.pm index 72b2dbd..b44110d 100644 --- a/lib/ID3FS/AudioFile/Flac.pm +++ b/lib/ID3FS/AudioFile/Flac.pm @@ -52,7 +52,7 @@ sub get sub artist { shift->get("ARTIST"); } sub album { shift->get("ALBUM"); } sub audiotype { return "flac"; } -sub haspic { return undef; } # FIXME +sub haspic { return undef; } # NEXTVERSION sub v1genre { return undef; } # ID3 only sub year { shift->get("DATE"); } diff --git a/lib/ID3FS/AudioFile/Mp3.pm b/lib/ID3FS/AudioFile/Mp3.pm index b3f7bf8..8133c91 100644 --- a/lib/ID3FS/AudioFile/Mp3.pm +++ b/lib/ID3FS/AudioFile/Mp3.pm @@ -60,7 +60,7 @@ sub album { shift->choose("album"); } # We don't care if year is not set sub year { shift->choose("year"); } sub audiotype { return "mp3"; } -sub haspic { return undef; } # FIXME +sub haspic { return undef; } # NEXTVERSION sub v1genre { diff --git a/lib/ID3FS/AudioFile/Ogg.pm b/lib/ID3FS/AudioFile/Ogg.pm index e5326ba..cdd9a9a 100644 --- a/lib/ID3FS/AudioFile/Ogg.pm +++ b/lib/ID3FS/AudioFile/Ogg.pm @@ -63,7 +63,7 @@ sub get sub artist { shift->get("Artist"); } sub album { shift->get("Album"); } sub audiotype { return "ogg"; } -sub haspic { return undef; } # FIXME +sub haspic { return undef; } # NEXTVERSION sub v1genre { return undef; } # ID3 only sub year { shift->get("Date"); } diff --git a/lib/ID3FS/DB.pm b/lib/ID3FS/DB.pm index 984bec0..a776653 100644 --- a/lib/ID3FS/DB.pm +++ b/lib/ID3FS/DB.pm @@ -195,13 +195,6 @@ sub relativise # absolute paths have empty first element due to leading / shift(@path) if($path[0] eq ""); shift(@rel) if($rel[0] eq ""); - if($path[0] ne $rel[0]) - { - # no path in common, return absolute - # should never happen - # FIXME - return $name; - } # f: /home/foo/bar/baz.mp3 # r: /home/ianb/music/albums while(@path && @rel && ($path[0] eq $rel[0])) diff --git a/lib/ID3FS/Path.pm b/lib/ID3FS/Path.pm index 4286381..8dcdd52 100644 --- a/lib/ID3FS/Path.pm +++ b/lib/ID3FS/Path.pm @@ -701,15 +701,7 @@ sub tags_subselect { my($self)=@_; my $hasvals=$self->expecting_values(); - if($self->{in_all}) - { - # FIXME: is this used? - die "IN_ALL CALLED!!\n"; - return "\tSELECT id FROM files AS files_id\n"; - } my $tree=$self->{tagtree}; - # FIXME - print "UNDEF!!\n" unless($self->{tagtree}); my $parent=$self->trailing_tag_parent(); # print "ELEMENTS: ", join('/', map { $_->{name}; } @{$self->{elements}}), "\n"; @@ -769,42 +761,6 @@ sub sql_start return $sql; } -# FIXME: remove -sub constraints_tag_list -{ - my($self, @constraints)=@_; - my $lasttag=undef; - my @tags=(); - my @tags_vals=(); - for my $constraint (@constraints) - { -# print ref($constraint), ": ", $constraint->{name}, "\n"; - if($self->is("tag", $constraint)) - { - if(defined($lasttag)) - { -# print "TAGVAL\n"; - push(@tags_vals, [$lasttag, $constraint->id()]) if defined($constraint->id()); - $lasttag=undef; - } - elsif($self->tag_has_values($constraint->id())) - { -# print "HASVALUES\n"; - $lasttag=$constraint->id() if defined($constraint->id()); - } - else - { -# print "NOVALUES\n"; - push(@tags, $constraint->id()) if(defined($constraint->id())); - } - } - } - @tags=map{ "\"$_\""; } @tags; - @tags_vals=map( { [ map({ "\"$_\""; } @$_ ) ] } @tags_vals); - $lasttag="\"$lasttag\"" if defined($lasttag); - return(\@tags, \@tags_vals, $lasttag); -} - # we just filter $ALLTRACKS, $NOARTIST and $NOALBUM # filtering tags properly requires up to four levels of recursion # (tag/tagval/AND/NOT) and is too slow diff --git a/sbin/id3fsd b/sbin/id3fsd index f55d0c1..61b7068 100755 --- a/sbin/id3fsd +++ b/sbin/id3fsd @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -use lib '/home/ianb/projects/id3fs/id3fs/lib'; +use lib '/home/ianb/projects/id3fs/id3fs/lib'; # FIXME: remove use strict; use Getopt::Long qw(Configure); use ID3FS::DB; -- 2.11.0