don't rename if tags missing
This commit is contained in:
parent
1764b8afea
commit
048693ec8c
@ -1,7 +1,34 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
getDestDir() {
|
getDestDir() {
|
||||||
destdir="${destinationpath[$destination]}/"
|
destdir="${destinationpath[$destination]}/"
|
||||||
if [ -n "${destinationrenamepath[$destination]}" ]
|
if [ -n "${destinationrenamepath[$destination]}" ] \
|
||||||
|
&& (
|
||||||
|
(
|
||||||
|
! [[ ${destinationrenamepath[$destination]} =~ %{album} ]] \
|
||||||
|
|| [ -n "$album" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrenamepath[$destination]} =~ %{albumartist} ]] \
|
||||||
|
|| [ -n "$albumartist" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrenamepath[$destination]} =~ %{artist} ]] \
|
||||||
|
|| [ -n "$artist" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrenamepath[$destination]} =~ %{genre} ]] \
|
||||||
|
|| [ -n "$genre" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrenamepath[$destination]} =~ %{title} ]] \
|
||||||
|
|| [ -n "$title" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrenamepath[$destination]} =~ %{track} ]] \
|
||||||
|
|| [ -n "$track" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrenamepath[$destination]} =~ %{year} ]] \
|
||||||
|
|| [ -n "$year" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrenamepath[$destination]} =~ %{disc} ]] \
|
||||||
|
|| [ -n "$disc" ]
|
||||||
|
)
|
||||||
|
)
|
||||||
then
|
then
|
||||||
replace=$(sanitizeFile "$album" dir)
|
replace=$(sanitizeFile "$album" dir)
|
||||||
destdir+="${destinationrenamepath[$destination]//%\{album\}/$replace}"
|
destdir+="${destinationrenamepath[$destination]//%\{album\}/$replace}"
|
||||||
|
|||||||
@ -1,6 +1,33 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
getDestFile() {
|
getDestFile() {
|
||||||
if [ -n "${destinationrename[$destination]}" ]
|
if [ -n "${destinationrename[$destination]}" ] \
|
||||||
|
&& (
|
||||||
|
(
|
||||||
|
! [[ ${destinationrename[$destination]} =~ %{album} ]] \
|
||||||
|
|| [ -n "$album" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrename[$destination]} =~ %{albumartist} ]] \
|
||||||
|
|| [ -n "$albumartist" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrename[$destination]} =~ %{artist} ]] \
|
||||||
|
|| [ -n "$artist" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrename[$destination]} =~ %{genre} ]] \
|
||||||
|
|| [ -n "$genre" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrename[$destination]} =~ %{title} ]] \
|
||||||
|
|| [ -n "$title" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrename[$destination]} =~ %{track} ]] \
|
||||||
|
|| [ -n "$track" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrename[$destination]} =~ %{year} ]] \
|
||||||
|
|| [ -n "$year" ]
|
||||||
|
) && (
|
||||||
|
! [[ ${destinationrename[$destination]} =~ %{disc} ]] \
|
||||||
|
|| [ -n "$disc" ]
|
||||||
|
)
|
||||||
|
)
|
||||||
then
|
then
|
||||||
destfile="${destinationrename[$destination]//%\{album\}/$album}"
|
destfile="${destinationrename[$destination]//%\{album\}/$album}"
|
||||||
destfile="${destfile//%\{albumartist\}/$albumartist}"
|
destfile="${destfile//%\{albumartist\}/$albumartist}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user