X-Git-Url: https://diplodocus.org/git/flac-archive/blobdiff_plain/19b87656f5d6ee53f075ba5f70b726650e0e3421..4dd6db29fed9bd8fe1afa42bd0f6ab9f0d255f25:/fa-rip diff --git a/fa-rip b/fa-rip index f327645..6cabb0a 100755 --- a/fa-rip +++ b/fa-rip @@ -86,6 +86,7 @@ sub tags_file { my $various = shift; my $artist = shift; my $album = shift; + my $release_dates = shift; my $fh; my $i; my $track; @@ -94,8 +95,14 @@ sub tags_file { open($fh, '>', $fn) or die("open('>$fn'): $!"); print($fh 'ARTIST=', (defined($artist) and $artist or ''), "\n"); print($fh 'ALBUM=', (defined($album) and $album or ''), "\n"); - # MusicBrainz doesn't have dates yet; these are usually wrong anyway. - print($fh "DATE=\n"); + + if (defined($release_dates) and %$release_dates) { + while (my ($country, $date) = each(%$release_dates)) { + print($fh "DATE[$country]=$date\n"); + } + } else { + print($fh "DATE=\n"); + } for $i (1 .. $trackcount) { $various and print($fh "ARTIST[$i]=\n"); @@ -143,9 +150,10 @@ sub tags { } } + my %dates = $album->get_release_dates; tags_file("candidate-tags-$i", $trackcount, $various, $album->get_artist->get_name, $album->get_name, - $album->get_tracks); + \%dates, $album->get_tracks); } } @@ -240,9 +248,8 @@ ignoring data tracks. =item CDDEV -B uses this to rip audio and save the cuesheet for a CD. It -makes some effort to check some common device names for FreeBSD, -Linux, and NetBSD by default. +B uses this to rip audio and save the cuesheet for a CD. +MusicBrainz::Client can usually figure this out automatically. =back