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