From cf5f97cb5aa0d307c90130d08fbbfeec1a1ecca4 Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Sun, 21 Feb 2016 17:22:12 +0000 Subject: [PATCH] Bugfix for year support in musicbrainz interface When using musicbrainz, don't assume that there will be release events attached to a particular CD release. --- abcde-musicbrainz-tool | 7 +++++-- changelog | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/abcde-musicbrainz-tool b/abcde-musicbrainz-tool index 3e83ad0..bcfcd84 100755 --- a/abcde-musicbrainz-tool +++ b/abcde-musicbrainz-tool @@ -1,5 +1,5 @@ #!/usr/bin/perl -# Copyright (c) 2012 Steve McIntyre <93sam@debian.org> +# Copyright (c) 2012-2016 Steve McIntyre <93sam@debian.org> # This code is hereby licensed for public consumption under either the # GNU GPL v2 or greater, or Larry Wall's Artistic license - your choice. # @@ -96,7 +96,10 @@ if ($command =~ m/^id/) { $va = 1; } my @events = @{$release->release_event_list()->events()}; - my $rel_year = substr($events[0]->date(),0,4); + my $rel_year = ""; + if ($release->release_event_list()->count() > 0) { + $rel_year = substr($events[0]->date(),0,4); + } $releasenum++; open (OUT, "> $workdir/cddbread.$releasenum"); diff --git a/changelog b/changelog index f26120d..af3d091 100644 --- a/changelog +++ b/changelog @@ -1,5 +1,9 @@ abcde 2.7.2 + * When using musicbrainz, don't assume that there will be release + events attached to a particular CD release. Bug fix for the addition + of year information support in 2.7.1. Thanks to Ed Oehler and Alan W. + Kerr for debugging help. * Support for output to the Matroska container (mka). Encoder is FFmpeg (or avconv). Typical conf file syntax would be: -- 2.20.1