diff --git a/lib/config/getGeneral b/lib/config/getGeneral index 1e7797d..c5d5f2e 100644 --- a/lib/config/getGeneral +++ b/lib/config/getGeneral @@ -75,6 +75,9 @@ getConfigGeneral() { 'database') database="$value" ;; + 'skip-timestamp-microsec') + skip_us_timestamp="$value" + ;; debug) (( value > debug )) && debug=$value ;; diff --git a/lib/config/write b/lib/config/write index f4954ad..e436231 100644 --- a/lib/config/write +++ b/lib/config/write @@ -33,6 +33,9 @@ database $database # * debug : 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. diff --git a/lib/files/getFiles b/lib/files/getFiles index f6c28db..72a21d8 100644 --- a/lib/files/getFiles +++ b/lib/files/getFiles @@ -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")