handle FIXMEs, remove dead code
authorIan Beckwith <ianb@erislabs.net>
Tue, 19 Oct 2010 14:41:32 +0000 (15:41 +0100)
committerIan Beckwith <ianb@erislabs.net>
Tue, 19 Oct 2010 14:41:32 +0000 (15:41 +0100)
lib/ID3FS/AudioFile.pm
lib/ID3FS/AudioFile/Flac.pm
lib/ID3FS/AudioFile/Mp3.pm
lib/ID3FS/AudioFile/Ogg.pm
lib/ID3FS/DB.pm
lib/ID3FS/Path.pm
sbin/id3fsd

index 394a1c5..bb91604 100644 (file)
@@ -74,7 +74,7 @@ sub audiotype
 
 sub haspic
 {
-    return undef; # FIXME
+    return undef; # NEXTVERSION
 #    my $self=shift;
 #    return $self->{audiofile}->haspic();
 }
index 72b2dbd..b44110d 100644 (file)
@@ -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");   }
 
index b3f7bf8..8133c91 100644 (file)
@@ -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
 {
index e5326ba..cdd9a9a 100644 (file)
@@ -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");   }
 
index 984bec0..a776653 100644 (file)
@@ -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]))
index 4286381..8dcdd52 100644 (file)
@@ -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
index f55d0c1..61b7068 100755 (executable)
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-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;