Fix to allow getalbumart to place image correctly for ONETRACK.
authorAndrew Strong <andrew.david.strong@gmail.com>
Fri, 11 Dec 2015 22:57:39 +0000 (09:57 +1100)
committerAndrew Strong <andrew.david.strong@gmail.com>
Fri, 11 Dec 2015 22:57:39 +0000 (09:57 +1100)
Thanks to Nino Burini for the bug report and also the fix. This
closes Issue 25:
http://abcde.einval.com/bugzilla/show_bug.cgi?id=25

abcde
changelog

diff --git a/abcde b/abcde
index 2d37edc..b1b1142 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -3180,11 +3180,19 @@ do_getalbumart()
                for OUTPUT in $(echo $OUTPUTTYPE | tr , \ )
                do
                        # put cover in the same place as the album
+                       if [ "$ONETRACK" = "y" ] ; then
+                               if [ "$VARIOUSARTISTS" = "y" ] ; then
+                                       ALBUMARTDIR="$(eval echo "$VAONETRACKOUTPUTFORMAT")"
+                               else
+                                       ALBUMARTDIR="$(eval echo "$ONETRACKOUTPUTFORMAT")"
+                       fi
+               else
                        if [ "$VARIOUSARTISTS" = "y" ] ; then
                                ALBUMARTDIR="$(eval echo "$VAOUTPUTFORMAT")"
                        else
                                ALBUMARTDIR="$(eval echo "$OUTPUTFORMAT")"
                        fi
+               fi
                        FINALALBUMARTDIR="$(dirname "$OUTPUTDIR/$ALBUMARTDIR")"
                        vecho "copying cover to target directory $FINALALBUMARTDIR" >&2
                        mkdir -p "$FINALALBUMARTDIR"
index 86aa213..2122c69 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,10 @@
+abcde 2.7.2
+
+  * Allow getalbumart to correctly place cover image when single
+    track is selected. Thanks to Nino Burini for the bug report
+    and also the fix. This closes Issue 25:
+    http://abcde.einval.com/bugzilla/show_bug.cgi?id=25
+    
 abcde 2.7.1
 
   * Rebuild of the abcde Makefile. Thanks to Reuben Thomas and Steve