X-Git-Url: https://diplodocus.org/git/flac-archive/blobdiff_plain/bbb47ac8a49e5cfa41d7fd3b5c584b76ff07ac4f..8c98014a57f590f5a0e473909ccb69e582893e7c:/fa-tags diff --git a/fa-tags b/fa-tags index d17dba3..7d023ec 100755 --- a/fa-tags +++ b/fa-tags @@ -2,9 +2,15 @@ # $Id$ +# See fa-flacd for documentation. + use strict; use warnings; +use Env qw( + CDDEV +); + use Getopt::Long; use Pod::Usage; @@ -18,7 +24,13 @@ $help and pod2usage(-exitstatus=>0, -verbose=>1); my $trackcount = shift or pod2usage(); -my $mb = new MusicBrainz::Client::Simple; +my $mb; +if (defined($CDDEV)) { + $mb = new MusicBrainz::Client::Simple (device=>$CDDEV); +} else { + $mb = new MusicBrainz::Client::Simple; +} + my @result = $mb->lookup_cd; die($mb->get_error) unless $mb->success; @@ -34,6 +46,8 @@ for my $album (@result) { print(F 'ARTIST=', $album->get_artist->get_name, "\n"); print(F 'ALBUM=', $album->get_name, "\n"); + + # MusicBrainz doesn't have dates yet; these are usually wrong anyway. print(F "DATE=\n"); my @tracks = $album->get_tracks;