Fix file renaming

This commit is contained in:
Vincent Riquer 2013-05-03 17:25:07 +02:00
parent 7c8617d713
commit 8b3f121179
3 changed files with 19 additions and 16 deletions

View File

@ -6,6 +6,7 @@ copyFiles_action() {
source_files.filename,
source_files.last_change,
destinations.id,
destinations.name,
destination_files.id
FROM source_files
INNER JOIN destination_files
@ -38,6 +39,8 @@ copyFiles_action() {
rest=${rest#*::AtOM:SQL:Sep::}
destinationid=${rest%%::AtOM:SQL:Sep::*}
rest=${rest#*::AtOM:SQL:Sep::}
destination=${rest%%::AtOM:SQL:Sep::*}
rest=${rest#*::AtOM:SQL:Sep::}
destfileid=${rest%%::AtOM:SQL:Sep::*}
rest=${rest#*::AtOM:SQL:Sep::}
echo 'SELECT IFNULL( (

View File

@ -4,28 +4,28 @@ getDestDir() {
if [ -n "${destinationrenamepath[$destination]}" ] \
&& (
(
! [[ ${destinationrenamepath[$destination]} =~ %{album} ]] \
! [[ ${destinationrenamepath[$destination]} =~ %\{album\} ]] \
|| [ -n "$album" ]
) && (
! [[ ${destinationrenamepath[$destination]} =~ %{albumartist} ]] \
! [[ ${destinationrenamepath[$destination]} =~ %\{albumartist\} ]] \
|| [ -n "$albumartist" ]
) && (
! [[ ${destinationrenamepath[$destination]} =~ %{artist} ]] \
! [[ ${destinationrenamepath[$destination]} =~ %\{artist\} ]] \
|| [ -n "$artist" ]
) && (
! [[ ${destinationrenamepath[$destination]} =~ %{genre} ]] \
! [[ ${destinationrenamepath[$destination]} =~ %\{genre\} ]] \
|| [ -n "$genre" ]
) && (
! [[ ${destinationrenamepath[$destination]} =~ %{title} ]] \
! [[ ${destinationrenamepath[$destination]} =~ %\{title\} ]] \
|| [ -n "$title" ]
) && (
! [[ ${destinationrenamepath[$destination]} =~ %{track} ]] \
! [[ ${destinationrenamepath[$destination]} =~ %\{track\} ]] \
|| [ -n "$track" ]
) && (
! [[ ${destinationrenamepath[$destination]} =~ %{year} ]] \
! [[ ${destinationrenamepath[$destination]} =~ %\{year\} ]] \
|| [ -n "$year" ]
) && (
! [[ ${destinationrenamepath[$destination]} =~ %{disc} ]] \
! [[ ${destinationrenamepath[$destination]} =~ %\{disc\} ]] \
|| [ -n "$disc" ]
)
)

View File

@ -3,28 +3,28 @@ getDestFile() {
if [ -n "${destinationrename[$destination]}" ] \
&& (
(
! [[ ${destinationrename[$destination]} =~ %{album} ]] \
! [[ ${destinationrename[$destination]} =~ %\{album\} ]] \
|| [ -n "$album" ]
) && (
! [[ ${destinationrename[$destination]} =~ %{albumartist} ]] \
! [[ ${destinationrename[$destination]} =~ %\{albumartist\} ]] \
|| [ -n "$albumartist" ]
) && (
! [[ ${destinationrename[$destination]} =~ %{artist} ]] \
! [[ ${destinationrename[$destination]} =~ %\{artist\} ]] \
|| [ -n "$artist" ]
) && (
! [[ ${destinationrename[$destination]} =~ %{genre} ]] \
! [[ ${destinationrename[$destination]} =~ %\{genre\} ]] \
|| [ -n "$genre" ]
) && (
! [[ ${destinationrename[$destination]} =~ %{title} ]] \
! [[ ${destinationrename[$destination]} =~ %\{title\} ]] \
|| [ -n "$title" ]
) && (
! [[ ${destinationrename[$destination]} =~ %{track} ]] \
! [[ ${destinationrename[$destination]} =~ %\{track\} ]] \
|| [ -n "$track" ]
) && (
! [[ ${destinationrename[$destination]} =~ %{year} ]] \
! [[ ${destinationrename[$destination]} =~ %\{year\} ]] \
|| [ -n "$year" ]
) && (
! [[ ${destinationrename[$destination]} =~ %{disc} ]] \
! [[ ${destinationrename[$destination]} =~ %\{disc\} ]] \
|| [ -n "$disc" ]
)
)