Compare commits

..

3 Commits

Author SHA1 Message Date
Vincent Riquer
f738ce4568 fix quoting issue 2026-01-16 03:47:46 +01:00
Vincent Riquer
18016f86c9 v1.0.5 changelog 2026-01-16 03:47:46 +01:00
ScriptFanix
12507b1e1a Resolve "Store dest filename relative" 2026-01-16 03:47:23 +01:00
4 changed files with 37 additions and 35 deletions

View File

@ -1,13 +1,12 @@
# DEV
# 1.0.5
### BUGS (Minor)
* `toys/createindex`: handle empty channel count, bitdepth and sampling rate cleanly
### Enhancements
* Allow ignoring microsecond precision in timestamps
* Don't print useless information (stuff that handled 0 files and such)
* Store transcoded file paths relative to their destination's root
* Add missing error codes (used but not declared)
* Support for newline character in filenames
* Store transcoded file paths relative to their destination's root (db version 7)
* Add missing (used but not declared) error codes
# 1.0.4
## `BREAKING CHANGES`

10
atom
View File

@ -697,11 +697,11 @@ endtime=$EPOCHSECONDS
(( cron )) || echo -n $'\r'
(( ran )) \
&& echo -n "Ran $ran tasks${failed:+, $failed of which failed,} \
in ${days:+$days days,} \
${hours:+$hours hours,} \
${minutes:+$minutes minutes and} \
$seconds seconds."
&& echo -n "Ran $ran tasks${failed:+, $failed of which failed,}" \
"in ${days:+$days days,}" \
"${hours:+$hours hours,}" \
"${minutes:+$minutes minutes and}" \
"$seconds seconds."
(( cron )) || echo -en "\033[K"
(( ran )) && echo

View File

@ -1,33 +1,36 @@
#!/bin/bash
copyFiles_matching() {
extension="${filename##*.}"
local extension="${filename##*.}"
if \
cp -al \
"$sourcepath/$filename" \
"$destdir/$destfile.$extension" \
"${destinationpath[$destination]}/$destdir/$destfile.$extension" \
2>/dev/null \
|| cp -a \
"$sourcepath/$filename" \
"$destdir/$destfile.$extension"
echo \
"UPDATE destination_files" \
"SET filename=" \
"\"${destdir//\"/\"\"}/${destfile//\"/\"\"}.$extension\"," \
" last_change=(" \
" SELECT last_change" \
" FROM source_files" \
" WHERE id=$fileid" \
" )," \
" old_filename=(" \
" SELECT filename" \
" FROM destination_files" \
" WHERE id=$destfileid" \
" )," \
" rename_pattern=" \
"\"${destinationrenamepath[$destination]}/${destinationrename[$destination]}\","\
" fat32compat=" \
"${destinationfat32compat["$destination"]}," \
" ascii=${destinationascii["$destination"]}" \
"WHERE id=$destfileid;" \
>&3
(( ++copies ))
"${destinationpath[$destination]}/$destdir/$destfile.$extension"
then
echo \
"UPDATE destination_files" \
"SET filename=" \
"\"${destdir//\"/\"\"}/${destfile//\"/\"\"}.$extension\"," \
" last_change=(" \
" SELECT last_change" \
" FROM source_files" \
" WHERE id=$fileid" \
" )," \
" old_filename=(" \
" SELECT filename" \
" FROM destination_files" \
" WHERE id=$destfileid" \
" )," \
" rename_pattern=" \
"\"${destinationrenamepath[$destination]}/${destinationrename[$destination]}\","\
" fat32compat=" \
"${destinationfat32compat["$destination"]}," \
" ascii=${destinationascii["$destination"]}"\
"WHERE id=$destfileid;" \
>&3
(( ++copies ))
fi
}

View File

@ -98,7 +98,7 @@ getDestDir() {
part=${part#*/}
done
fi
if ! [ -d "$destdir" ]
if ! [ -d "${destinationpath[$destination]}/$destdir" ]
then
mkdir -p "${destinationpath[$destination]}/$destdir"
fi