* abcde.conf, abcde, abcde.1
[clinton/abcde.git] / abcde
diff --git a/abcde b/abcde
index ea84e47..e233a6e 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -661,7 +661,7 @@ do_move ()
                ALBUMFILE=$(mungefilename "$DALBUM")
                ARTISTFILE=$(mungefilename "$TRACKARTIST")
                TRACKFILE=$(mungefilename "$TRACKNAME")
                ALBUMFILE=$(mungefilename "$DALBUM")
                ARTISTFILE=$(mungefilename "$TRACKARTIST")
                TRACKFILE=$(mungefilename "$TRACKNAME")
-               GENRE=$(echo $CDGENRE | tr "[:upper:]" "[:lower:]")
+               GENRE=$(mungegenre "$GENRE")
                YEAR=$(echo $CDYEAR)
                # If we want to start the tracks with a given number, we need to modify the
                # TRACKNUM value before evaluation
                YEAR=$(echo $CDYEAR)
                # If we want to start the tracks with a given number, we need to modify the
                # TRACKNUM value before evaluation
@@ -701,7 +701,7 @@ do_playlist ()
                for LASTTRACK in $TRACKQUEUE; do :; done
                ALBUMFILE=$(mungefilename "$DALBUM")
                ARTISTFILE=$(mungefilename "$DARTIST")
                for LASTTRACK in $TRACKQUEUE; do :; done
                ALBUMFILE=$(mungefilename "$DALBUM")
                ARTISTFILE=$(mungefilename "$DARTIST")
-               GENRE=$(echo $CDGENRE | tr "[:upper:]" "[:lower:]")
+               GENRE=$(mungegenre "$GENRE")
                if [ "$VARIOUSARTISTS" = "y" ] ; then
                        PLAYLISTFILE=$(eval echo $VAPLAYLISTFORMAT)
                else
                if [ "$VARIOUSARTISTS" = "y" ] ; then
                        PLAYLISTFILE=$(eval echo $VAPLAYLISTFORMAT)
                else
@@ -1767,6 +1767,12 @@ mungefilename ()
        echo "$@" | sed s,:,\ -,g | tr \ /\* __+ | tr -d \'\"\?\[:cntrl:\]
 }
 
        echo "$@" | sed s,:,\ -,g | tr \ /\* __+ | tr -d \'\"\?\[:cntrl:\]
 }
 
+# Custom genre munging:
+mungegenre ()
+{
+       echo $CDGENRE | tr "[:upper:]" "[:lower:]"
+}
+
 # pre_read
 # Empty pre_read function, to be defined in the configuration file.
 pre_read ()
 # pre_read
 # Empty pre_read function, to be defined in the configuration file.
 pre_read ()