diff --git a/src/.abcde.conf b/src/.abcde.conf index 8b5d4ae..7f55984 100644 --- a/src/.abcde.conf +++ b/src/.abcde.conf @@ -29,11 +29,12 @@ VAONETRACKOUTPUTFORMAT='${OUTPUT}/Other, Various Artists/${ARTISTFILE} - ${TRACK # mungefilename receives the CDDB data (artist, track, title, whatever) as $1 # and outputs it on stdout. # This custom function will do the following: -# * Eat printable ASCII characters which are forbidden in Windows and Linux -# (<>:"/\|?*) and control characters +# * Eat control characters +# * Convert '/' to '-' to ensure valid filenames on ext2/ext3/ext4 filesystems +# TODO: add checks for other filesystems (FAT32, NFTS for Windows, HFS, HFS+ for MacOS) mungefilename () { - echo "$@" | tr -d "<>:\"/\\\\|?*[:cntrl:]" + echo "$@" | tr -d '[:cntrl:]' | tr '/' '-' } # Embed album art in addition to default actions