File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function do_image () {
2222
2323 echo " PARENT_DIR: $PARENT_DIR "
2424
25- local creation_time=$( exiftool -DateTimeOriginal - d " %Y-%m-%d %H:%M:%S" " $FILE " | awk -F ' : ' ' {print $2} ' )
25+ local creation_time=$( exiftool -printFormat ' $ DateTimeOriginal' -DateTimeOriginal - d " %Y-%m-%d %H:%M:%S" " $FILE " )
2626
2727 local filename=$( basename " $FILE " )
2828 # If creation_time is not available, try getting it from filename
@@ -54,7 +54,7 @@ function do_image () {
5454 fi
5555 fi
5656
57- creation_time=$( exiftool -DateTimeOriginal - d " %Y-%m-%d %H:%M:%S" " $FILE " | awk -F ' : ' ' {print $2} ' )
57+ creation_time=$( exiftool -printFormat ' $ DateTimeOriginal' -DateTimeOriginal - d " %Y-%m-%d %H:%M:%S" " $FILE " )
5858
5959 # If creation_time is not available, move it to root
6060 if [[ " $creation_time " == " null" || -z " $creation_time " ]]; then
@@ -183,7 +183,7 @@ function do_video () {
183183base=$( basename " $1 " )
184184if [[ ! " $base " =~ $IGNORE_REGEX ]]; then
185185 echo " Processing: $1 "
186- mimetype=$( file --mime-type --no-pad $1 | awk ' {print $2} ' )
186+ mimetype=$( file --brief --mime-type " $1 " )
187187
188188 case $mimetype in
189189 image/* )
You can’t perform that action at this time.
0 commit comments