releasecountry: renamepattern
This commit is contained in:
parent
537c205577
commit
ec99e0ffce
@ -10,6 +10,10 @@ getDestDir() {
|
||||
[[ ${destinationrenamepath[$destination]} == \
|
||||
*?([^[])%\{albumartist\}?([^\]])* ]] \
|
||||
&& [ -n "$albumartist" ]
|
||||
) || (
|
||||
[[ ${destinationrenamepath[$destination]} == \
|
||||
*?([^[])%\{releasecountry\}?([^\]])* ]] \
|
||||
&& [ -n "$releasecountry" ]
|
||||
) || (
|
||||
[[ ${destinationrenamepath[$destination]} == \
|
||||
*?([^[])%\{artist\}?([^\]])* ]] \
|
||||
@ -44,6 +48,8 @@ getDestDir() {
|
||||
read -r -u${toascii[0]} album
|
||||
echo "$albumartist" >&${toascii[1]}
|
||||
read -r -u${toascii[0]} albumartist
|
||||
echo "$releasecountry" >&${toascii[1]}
|
||||
read -r -u${toascii[0]} releasecountry
|
||||
echo "$artist" >&${toascii[1]}
|
||||
read -r -u${toascii[0]} artist
|
||||
echo "$genre" >&${toascii[1]}
|
||||
@ -61,6 +67,8 @@ getDestDir() {
|
||||
destdir+="${destinationrenamepath[$destination]//?(\[)%\{album\}?(\])/$replace}"
|
||||
replace=$(sanitizeFile "$albumartist" dir)
|
||||
destdir="${destdir//?(\[)%\{albumartist\}?(\])/$replace}"
|
||||
replace=$(sanitizeFile "$releasecountry" dir)
|
||||
destdir="${destdir//?(\[)%\{releasecountry\}?(\])/$releasecountry}"
|
||||
replace=$(sanitizeFile "$artist" dir)
|
||||
destdir="${destdir//?(\[)%\{artist\}?(\])/$replace}"
|
||||
replace=$(sanitizeFile "$genre" dir)
|
||||
|
||||
@ -10,6 +10,10 @@ getDestFile() {
|
||||
[[ ${destinationrename[$destination]} == \
|
||||
*?([^[])%\{albumartist\}?([^\]])* ]] \
|
||||
&& [ -n "$albumartist" ]
|
||||
) || (
|
||||
[[ ${destinationrenamepath[$destination]} == \
|
||||
*?([^[])%\{releasecountry\}?([^\]])* ]] \
|
||||
&& [ -n "$releasecountry" ]
|
||||
) || (
|
||||
[[ ${destinationrename[$destination]} == \
|
||||
*?([^[])%\{artist\}?([^\]])* ]] \
|
||||
@ -39,6 +43,7 @@ getDestFile() {
|
||||
then
|
||||
destfile="${destinationrename[$destination]//?(\[)%\{album\}?(\])/$album}"
|
||||
destfile="${destfile//?(\[)%\{albumartist\}?(\])/$albumartist}"
|
||||
destfile="${destfile//?(\[)%\{releasecountry\}?(\])/$releasecountry}"
|
||||
destfile="${destfile//?(\[)%\{artist\}?(\])/$artist}"
|
||||
destfile="${destfile//?(\[)%\{genre\}?(\])/$genre}"
|
||||
destfile="${destfile//?(\[)%\{title\}?(\])/$title}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user