From: epg <> Date: Tue, 4 Oct 2005 07:12:46 +0000 (+0000) Subject: Oops, support for untagged files was not complete. Fix. X-Git-Url: https://diplodocus.org/git/flac-archive/commitdiff_plain/4dd6db29fed9bd8fe1afa42bd0f6ab9f0d255f25?ds=sidebyside Oops, support for untagged files was not complete. Fix. --- diff --git a/flac2mp3 b/flac2mp3 index ab83c9f..21cf9c5 100755 --- 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;