]> diplodocus.org Git - flac-archive/commitdiff
Oops, support for untagged files was not complete. Fix.
authorepg <>
Tue, 4 Oct 2005 07:12:46 +0000 (07:12 +0000)
committerepg <>
Tue, 4 Oct 2005 07:12:46 +0000 (07:12 +0000)
flac2mp3

index ab83c9f9528110eeab7a55fcc6b7ba8e10d63ea0..21cf9c55e2af993ec363bed90f286a5b2e267532 100755 (executable)
--- a/flac2mp3
+++ b/flac2mp3
@@ -135,6 +135,11 @@ sub get_tags {
     }
     close(TAGS) or die("close(metaflac --export-vc-to=- $fn): $?");
 
+    # If no TITLEs, stick a dummy in here.
+    if (@$titles == 0) {
+        push(@$titles, undef);
+    }
+
     return ($artist, $album, $date, $discnum, $track);
 }
 
@@ -151,10 +156,10 @@ sub arg {
 
 sub flac2mp3 {
     my $fn = shift;
-    my $title = shift;
-    my $artist = shift;
-    my $album = shift;
-    my $date = shift;
+    my $title = (shift or 'unknown');
+    my $artist = (shift or 'unknown');
+    my $album = (shift or 'unknown');
+    my $date = (shift or 'unknown');
     my $track = int(shift);
     my $skip_arg = shift;
     my $until_arg = shift;