AtOM/lib/files/getDestFile
2013-04-08 02:52:56 +02:00

20 lines
608 B
Bash

#!/bin/bash
getDestFile() {
if [ -n "${destinationrename[$destination]}" ]
then
destfile="${destinationrename[$destination]//%\{album\}/$album}"
destfile="${destfile//%\{albumartist\}/$albumartist}"
destfile="${destfile//%\{artist\}/$artist}"
destfile="${destfile//%\{genre\}/$genre}"
destfile="${destfile//%\{title\}/$title}"
tracknumber="${track%/*}"
destfile="${destfile//%\{track\}/$tracknumber}"
destfile="${destfile//%\{year\}/$year}"
destfile="${destfile//%\{disc\}/$disc}"
else
destfile="${filename##*/}"
destfile="${destfile%.*}"
fi
destfile=$(sanitizeFile "$destfile")
}