|
19
|
19
|
VERIFY_MODE="size" # options: size, strict, none
|
|
20
|
20
|
DATE_SOURCE="auto" # options: auto, exif, filesystem
|
|
21
|
21
|
SYNC_METADATA=0 # when 1, write reconstructed date into destination metadata
|
|
|
22
|
+QUICKTIME_UTC=1 # when 0, treat QuickTime dates as already local (for cameras that store local time instead of UTC)
|
|
22
|
23
|
UNATTENDED=0 # when 1, never prompt; destination conflicts get numeric suffixes
|
|
23
|
24
|
DRY_RUN=0
|
|
24
|
25
|
VERBOSE=0
|
|
108
|
109
|
--verify-mode MODE size|strict|none (default: size)
|
|
109
|
110
|
--date-source SOURCE auto|exif|filesystem (default: auto)
|
|
110
|
111
|
--sync-metadata Write chosen date into destination metadata (automatic for GoPro filesystem dates)
|
|
|
112
|
+ --no-quicktime-utc Treat QuickTime dates as already local time (for cameras that store local time instead of UTC)
|
|
111
|
113
|
--unattended Never prompt; resolve destination conflicts with numeric suffixes
|
|
112
|
114
|
--collect-unsortable Put files without dates into DEST/unsortable
|
|
113
|
115
|
--keep-sidecars Keep device sidecar files (default: delete after import)
|
|
831
|
833
|
fi
|
|
832
|
834
|
fi
|
|
833
|
835
|
|
|
834
|
|
- # For QuickTime files, the CreateDate is in UTC and needs conversion to local time
|
|
835
|
|
- if [[ "$date_source" == *"QuickTime"* ]]; then
|
|
|
836
|
+ # For QuickTime files, the CreateDate is in UTC and needs conversion to local time.
|
|
|
837
|
+ # Skip this conversion with --no-quicktime-utc for cameras that store local time in the UTC field
|
|
|
838
|
+ # (common on some GoPro models/firmware with incorrect timezone settings).
|
|
|
839
|
+ if [[ "$date_source" == *"QuickTime"* && $QUICKTIME_UTC -eq 1 ]]; then
|
|
836
|
840
|
# Convert UTC time to local time
|
|
837
|
841
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
838
|
842
|
# On macOS, use TZ=UTC to interpret the input time as UTC
|
|
1383
|
1387
|
SYNC_METADATA=1
|
|
1384
|
1388
|
shift
|
|
1385
|
1389
|
;;
|
|
|
1390
|
+ --no-quicktime-utc)
|
|
|
1391
|
+ QUICKTIME_UTC=0
|
|
|
1392
|
+ shift
|
|
|
1393
|
+ ;;
|
|
1386
|
1394
|
--unattended)
|
|
1387
|
1395
|
UNATTENDED=1
|
|
1388
|
1396
|
shift
|
|
1475
|
1483
|
echo " Verify mode: $VERIFY_MODE"
|
|
1476
|
1484
|
echo " Date source: $DATE_SOURCE"
|
|
1477
|
1485
|
echo " Sync metadata: $([ $SYNC_METADATA -eq 1 ] && echo "Yes" || echo "No")"
|
|
|
1486
|
+echo " QuickTime UTC: $([ $QUICKTIME_UTC -eq 1 ] && echo "Yes" || echo "No (local time assumed)")"
|
|
1478
|
1487
|
echo " Unattended: $([ $UNATTENDED -eq 1 ] && echo "Yes" || echo "No")"
|
|
1479
|
1488
|
echo " Dry run: $([ $DRY_RUN -eq 1 ] && echo "Yes" || echo "No")"
|
|
1480
|
1489
|
echo " Keep empty dirs: $([ $CLEANUP_EMPTY_DIRS -eq 0 ] && echo "Yes" || echo "No")"
|