allow ignoring microseconds in file timestamps
This commit is contained in:
parent
b6110cf626
commit
c8974a2aff
@ -75,6 +75,9 @@ getConfigGeneral() {
|
||||
'database')
|
||||
database="$value"
|
||||
;;
|
||||
'skip-timestamp-microsec')
|
||||
skip_us_timestamp="$value"
|
||||
;;
|
||||
debug)
|
||||
(( value > debug )) && debug=$value
|
||||
;;
|
||||
|
||||
@ -33,6 +33,9 @@ database $database
|
||||
# * debug <level>: Integer.
|
||||
#debug 1
|
||||
|
||||
# * skip-timestamp-microsec: Ignore microsecond precision in timestamps.
|
||||
skip-timestamp-microsec ${skip_us_timestamp:-0}
|
||||
|
||||
|
||||
[source]
|
||||
# This section defines where are the files you want transcoded.
|
||||
|
||||
@ -10,10 +10,17 @@ getFiles() {
|
||||
echo 'BEGIN TRANSACTION;' >&3
|
||||
while read time size filename
|
||||
do
|
||||
if (( skip_us_timestamp ))
|
||||
then
|
||||
compare_time=${time%.*}.%
|
||||
else
|
||||
compare_time=$time
|
||||
fi
|
||||
if ! Select source_files id >/dev/null <<-EOWhere
|
||||
filename = $filename
|
||||
mime_type > 0
|
||||
last_change = $time
|
||||
last_change LIKE $compare_time
|
||||
size = $size
|
||||
EOWhere
|
||||
then
|
||||
mimetype=$(file -b --mime-type "$sourcepath/$filename")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user