diff --git a/atom b/atom index d2dd2ec..bcacbf4 100755 --- a/atom +++ b/atom @@ -388,6 +388,8 @@ echo ' id INTEGER PRIMARY KEY, key TEXT UNIQUE, rename_pattern TEXT, + fat32compat INTEGER, + ascii INTEGER, source_file INTEGER, fileid INTEGER, filename TEXT, @@ -793,7 +795,9 @@ do WHERE destinations.name="'"$destination"'" AND (destination_files.rename_pattern != -"'"${destinationrenamepath[$destination]}/${destinationrename[$destination]}:${destinationfat32compat["$destination"]}"'" +"'"${destinationrenamepath[$destination]}/${destinationrename[$destination]}"'" + OR fat32compat != ${destinationfat32compat["$destination"]} + OR ascii != ${destinationascii["$destination"]} OR destination_files.rename_pattern is NULL) AND destination_files.last_change > 0 ; @@ -859,7 +863,11 @@ do echo "UPDATE destination_files" \ "SET filename=\"${destfilename//\"/\"\"}\"," \ " rename_pattern=" \ -"\"${destinationrenamepath[$destination]}/${destinationrename[$destination]}:${destinationfat32compat["$destination"]}\"" \ +"\"${destinationrenamepath[$destination]}/${destinationrename[$destination]}" \ + " fat32compat=" +"${destinationfat32compat["$destination"]}\"" \ + " ascii=" \ +"${destinationascii["$destination"]}" \ "WHERE id=$destfileid;" \ >&3 if (( commit )) diff --git a/lib/copy/action b/lib/copy/action index a4589dd..401f080 100644 --- a/lib/copy/action +++ b/lib/copy/action @@ -74,7 +74,9 @@ copyFiles_action() { then Update destination_files \ filename "$destdir/${sourcefilename##*/}"\ - rename_pattern "${destinationrenamepath[$destination]}/${destinationrename[$destination]}:${destinationfat32compat["$destination"]}"\ + rename_pattern "${destinationrenamepath[$destination]}/${destinationrename[$destination]}"\ + fat32compat ${destinationfat32compat["$destination"]}\ + ascii ${destinationascii["$destination"]}\ last_change $lastchange \ <<-EOWhere id = $destfileid diff --git a/lib/copy/matching b/lib/copy/matching index 64a3744..6c52329 100644 --- a/lib/copy/matching +++ b/lib/copy/matching @@ -22,8 +22,11 @@ copyFiles_matching() { " FROM destination_files" \ " WHERE id=$destfileid" \ " )," \ - " rename_pattern=" \ -"\"${destinationrenamepath[$destination]}/${destinationrename[$destination]}:${destinationfat32compat["$destination"]}\""\ + " rename_pattern" \ +"\"${destinationrenamepath[$destination]}/${destinationrename[$destination]}\""\ + " fat32compat" \ + " ${destinationfat32compat["$destination"]}"\ + " ascii ${destinationascii["$destination"]}"\ "WHERE id=$destfileid;" \ >&3 (( ++copies )) diff --git a/lib/encode/mp3 b/lib/encode/mp3 index 7474ab2..4963b5e 100644 --- a/lib/encode/mp3 +++ b/lib/encode/mp3 @@ -65,7 +65,9 @@ encodeFile::mp3() { cleanup $tempdir/$tmpfile.wav source_file $fileid status 0 - rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}:${destinationfat32compat["$destination"]} + rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]} + fat32compat ${destinationfat32compat["$destination"]} + ascii ${destinationascii["$destination"]} EOInsert ) progressSpin diff --git a/lib/encode/opus b/lib/encode/opus index 8e9bbcd..3aa993d 100644 --- a/lib/encode/opus +++ b/lib/encode/opus @@ -37,7 +37,9 @@ encodeFile::opus() { cleanup $tempdir/$tmpfile.wav source_file $fileid status 0 - rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}:${destinationfat32compat["$destination"]} + rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]} + fat32compat ${destinationfat32compat["$destination"]} + ascii ${destinationascii["$destination"]} EOInsert ) progressSpin diff --git a/lib/encode/vorbis b/lib/encode/vorbis index 7c32538..7eee65c 100644 --- a/lib/encode/vorbis +++ b/lib/encode/vorbis @@ -33,7 +33,9 @@ encodeFile::vorbis() { cleanup $tempdir/$tmpfile.wav source_file $fileid status 0 - rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}:${destinationfat32compat["$destination"]} + rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]} + fat32compat ${destinationfat32compat["$destination"]} + ascii ${destinationascii["$destination"]} EOInsert ) progressSpin diff --git a/lib/workers/cleaner b/lib/workers/cleaner index 56071ea..177def4 100644 --- a/lib/workers/cleaner +++ b/lib/workers/cleaner @@ -47,6 +47,16 @@ cleaner() { " SELECT rename_pattern" \ " FROM tasks" \ " WHERE id=$taskid" \ + " )," \ + " fat32compat=(" \ + " SELECT fat32compat" \ + " FROM tasks" \ + " WHERE id=$taskid" \ + " )," \ + " ascii=(" \ + " SELECT ascii" \ + " FROM tasks" \ + " WHERE id=$taskid" \ " )" \ "WHERE id=$destfileid;" \ >&3