Added Subject to JSON sidecar to match info Photo exports in XMP
This commit is contained in:
parent
4a1adaa156
commit
ba224af3fb
@ -614,10 +614,17 @@ class PhotoInfo:
|
||||
exif["Title"] = self.title
|
||||
|
||||
if self.keywords:
|
||||
exif["TagsList"] = exif["Keywords"] = self.keywords
|
||||
exif["TagsList"] = exif["Keywords"] = list(self.keywords)
|
||||
# Photos puts both keywords and persons in Subject when using "Export IPTC as XMP"
|
||||
exif["Subject"] = list(self.keywords)
|
||||
|
||||
if self.persons:
|
||||
exif["PersonInImage"] = self.persons
|
||||
# Photos puts both keywords and persons in Subject when using "Export IPTC as XMP"
|
||||
if "Subject" in exif:
|
||||
exif["Subject"].extend(self.persons)
|
||||
else:
|
||||
exif["Subject"] = self.persons
|
||||
|
||||
# if self.favorite():
|
||||
# exif["Rating"] = 5
|
||||
|
||||
@ -451,6 +451,7 @@ def test_exiftool_json_sidecar():
|
||||
"Title": "St. James\'s Park",
|
||||
"TagsList": ["London 2018", "St. James\'s Park", "England", "United Kingdom", "UK", "London"],
|
||||
"Keywords": ["London 2018", "St. James\'s Park", "England", "United Kingdom", "UK", "London"],
|
||||
"Subject": ["London 2018", "St. James\'s Park", "England", "United Kingdom", "UK", "London"],
|
||||
"GPSLatitude": "51 deg 30\' 12.86\\" N",
|
||||
"GPSLongitude": "0 deg 7\' 54.50\\" W",
|
||||
"GPSPosition": "51 deg 30\' 12.86\\" N, 0 deg 7\' 54.50\\" W",
|
||||
|
||||
@ -393,6 +393,7 @@ def test_exiftool_json_sidecar():
|
||||
"Title": "St. James\'s Park",
|
||||
"TagsList": ["London 2018", "St. James\'s Park", "England", "United Kingdom", "UK", "London"],
|
||||
"Keywords": ["London 2018", "St. James\'s Park", "England", "United Kingdom", "UK", "London"],
|
||||
"Subject": ["London 2018", "St. James\'s Park", "England", "United Kingdom", "UK", "London"],
|
||||
"GPSLatitude": "51 deg 30\' 12.86\\" N",
|
||||
"GPSLongitude": "0 deg 7\' 54.50\\" W",
|
||||
"GPSPosition": "51 deg 30\' 12.86\\" N, 0 deg 7\' 54.50\\" W",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user