Fix embedding album art with single track encodes
authorAndrew Strong <andrew.david.strong@gmail.com>
Fri, 28 Jul 2017 01:44:17 +0000 (11:44 +1000)
committerAndrew Strong <andrew.david.strong@gmail.com>
Fri, 28 Jul 2017 01:44:17 +0000 (11:44 +1000)
Allow for embedding with do_embedalbumart() for single
track encodes when OUTPUTFORMAT and ONETRACKOUTPUTFORMAT
are different. Thanks to Ashley Gittins for the bug report.

This closes Issue 63:
https://abcde.einval.com/bugzilla/show_bug.cgi?id=63

abcde
changelog

diff --git a/abcde b/abcde
index 44bd94e..44c070c 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -3316,12 +3316,21 @@ do_embedalbumart()
        # Allow for multiple output formats:
        for OUTPUT in $(echo $OUTPUTTYPE | tr , \ )
        do
-
-               # Find the output directory:
-               if [ "$VARIOUSARTISTS" = "y" ] ; then
-                       FINDPATH="$(eval echo "$VAOUTPUTFORMAT")"
-               else
-                       FINDPATH="$(eval echo "$OUTPUTFORMAT")"
+               # Find the output directory for multi track encodes:
+               if [ "$ONETRACK" != "y" ] ; then
+                       if [ "$VARIOUSARTISTS" = "y" ] ; then
+                               FINDPATH="$(eval echo "$VAOUTPUTFORMAT")"
+                       else
+                               FINDPATH="$(eval echo "$OUTPUTFORMAT")"
+                       fi
+               fi
+               # Find the output directory for single track encodes:
+               if [ "$ONETRACK" = "y" ] ; then
+                       if [ "$VARIOUSARTISTS" = "y" ] ; then
+                               FINDPATH="$(eval echo "$VAONETRACKOUTPUTFORMAT")"
+                               else
+                               FINDPATH="$(eval echo "$ONETRACKOUTPUTFORMAT")"
+                       fi
                fi
 
        FINALDIR="$(dirname "$OUTPUTDIR/$FINDPATH")"
index edf7fb4..7fe889f 100644 (file)
--- a/changelog
+++ b/changelog
@@ -31,6 +31,10 @@ abcde 2.8.2
   
    Command line letters are fast running out but the 'Q' option quite neatly
    stands for 'Query'!
+ * Allow for embedding with do_embedalbumart() for single track encodes when
+   OUTPUTFORMAT and ONETRACKOUTPUTFORMAT are different. Thanks to Ashley Gittins
+   for the bug report. This closes Issue 63:
+   https://abcde.einval.com/bugzilla/show_bug.cgi?id=63
    
 abcde 2.8.1.