implement renaming
This commit is contained in:
parent
712201a97f
commit
3e1b6bc1c0
38
atom
38
atom
@ -1030,6 +1030,44 @@ copyFile() {
|
|||||||
progressSpin
|
progressSpin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getDestDir() {
|
||||||
|
destdir="${destinationpath[$destination]}/"
|
||||||
|
if [ -n "${destinationrenamepath[$destination]}" ]
|
||||||
|
then
|
||||||
|
destdir+="${destinationrenamepath[$destination]//%\{album\}/$album}"
|
||||||
|
destdir="${destdir//%\{albumartist\}/$albumartist}"
|
||||||
|
destdir="${destdir//%\{artist\}/$artist}"
|
||||||
|
destdir="${destdir//%\{genre\}/$genre}"
|
||||||
|
destdir="${destdir//%\{title\}/$title}"
|
||||||
|
tracknumber="${track%/*}"
|
||||||
|
destdir="${destdir//%\{track\}/$tracknumber}"
|
||||||
|
destdir="${destdir//%\{year\}/$year}"
|
||||||
|
else
|
||||||
|
destdir+="${filename%/*}"
|
||||||
|
fi
|
||||||
|
if ! [ -d "$destdir" ]
|
||||||
|
then
|
||||||
|
mkdir -p "$destdir"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
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}"
|
||||||
|
else
|
||||||
|
destfile="${filename##*/}"
|
||||||
|
destfile="${destfile%.*}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
transcodeFile() {
|
transcodeFile() {
|
||||||
#sox -> wav
|
#sox -> wav
|
||||||
for format in $targets["format"]
|
for format in $targets["format"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user