Added Quicktime:ContentCreateDate to photo exporter #890 (#891)

This commit is contained in:
Rhet Turnbull 2022-12-30 23:32:58 -07:00 committed by GitHub
parent e76b2cfadc
commit 45392511e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -123,6 +123,7 @@ class _ExifToolProc:
)
return
self._process_running = False
self._large_file_support = large_file_support
self._exiftool = exiftool or get_exiftool_path()
self._start_proc(large_file_support=large_file_support)
@ -130,7 +131,7 @@ class _ExifToolProc:
def process(self):
"""return the exiftool subprocess"""
if not self._process_running:
self._start_proc()
self._start_proc(large_file_support=self._large_file_support)
return self._process
@property

View File

@ -707,7 +707,7 @@ class PhotoExporter:
# NOTE: The order of certain checks is important
# read the comments below to understand why before changing
export_db = options.export_db
fileutil = options.fileutil
@ -1588,6 +1588,7 @@ class PhotoExporter:
IPTC:DateCreated
IPTC:TimeCreated
QuickTime:CreationDate
QuickTime:ContentCreateDate
QuickTime:CreateDate (UTC)
QuickTime:ModifyDate (UTC)
QuickTime:GPSCoordinates
@ -1778,6 +1779,11 @@ class PhotoExporter:
# https://exiftool.org/forum/index.php?topic=11927.msg64369#msg64369
exif["QuickTime:CreationDate"] = f"{datetimeoriginal}{offsettime}"
# also add QuickTime:ContentCreateDate
# reference: https://github.com/RhetTbull/osxphotos/pull/888
# exiftool writes this field with timezone so include it here
exif["QuickTime:ContentCreateDate"] = f"{datetimeoriginal}{offsettime}"
date_utc = datetime_tz_to_utc(date)
creationdate = date_utc.strftime("%Y:%m:%d %H:%M:%S")
exif["QuickTime:CreateDate"] = creationdate