diff --git a/README.md b/README.md
index 723be10b..03bfdbd5 100644
--- a/README.md
+++ b/README.md
@@ -1156,7 +1156,13 @@ Returns True if photo is a [cloud asset](#iscloudasset) and is synched to iCloud
**Note**: Applies to master (original) photo only. It's possible for the master to be in iCloud but a local edited version is not yet synched to iCloud. `incloud` provides status of only the master photo. osxphotos does not yet provide a means to determine if the edited version is in iCloud. If you need this feature, please open an [issue](https://github.com/RhetTbull/osxphotos/issues).
#### `uti`
-Returns Uniform Type Identifier (UTI) for the image, for example: 'public.jpeg' or 'com.apple.quicktime-movie'
+Returns Uniform Type Identifier (UTI) for the current version of the image, for example: 'public.jpeg' or 'com.apple. quicktime-movie'. If the image has been edited, `uti` will return the UTI for the edited image, otherwise it will return the UTI for the original image.
+
+#### `uti_original`
+Returns Uniform Type Identifier (UTI) for the original image, for example: 'public.jpeg' or 'com.apple.quicktime-movie'.
+
+#### `uti_raw`
+Returns Uniform Type Identifier (UTI) for the associated RAW image, if there is one; for example, 'com.canon.cr2-raw-image'.
#### `burst`
Returns True if photos is a burst image (e.g. part of a set of burst images), otherwise False.
diff --git a/osxphotos/photoinfo/photoinfo.py b/osxphotos/photoinfo/photoinfo.py
index c71f524f..a5288600 100644
--- a/osxphotos/photoinfo/photoinfo.py
+++ b/osxphotos/photoinfo/photoinfo.py
@@ -475,6 +475,13 @@ class PhotoInfo:
"""
return self._info["UTI"]
+ @property
+ def uti_original(self):
+ """ Returns Uniform Type Identifier (UTI) for the original image
+ for example: public.jpeg or com.apple.quicktime-movie
+ """
+ return self._info["UTI_original"]
+
@property
def uti_raw(self):
""" Returns Uniform Type Identifier (UTI) for the RAW image if there is one
diff --git a/osxphotos/photosdb/photosdb.py b/osxphotos/photosdb/photosdb.py
index 144898ae..7cd77deb 100644
--- a/osxphotos/photosdb/photosdb.py
+++ b/osxphotos/photosdb/photosdb.py
@@ -989,6 +989,9 @@ class PhotosDB:
self._dbphotos[uuid]["UTI"] = row[22]
+ # TODO: need to update this for Photos 4
+ self._dbphotos[uuid]["UTI_original"] = row[22]
+
# handle burst photos
# if burst photo, determine whether or not it's a selected burst photo
self._dbphotos[uuid]["burstUUID"] = row[23]
@@ -1126,6 +1129,7 @@ class PhotosDB:
info["isMissing"] = row[3]
info["originalFilename"] = row[4]
info["UTI"] = row[5]
+ info["UTI_original"] = None # filled in later
info["modelID"] = row[6]
info["fileSize"] = row[7]
info["isTrulyRAW"] = row[8]
@@ -2061,14 +2065,19 @@ class PhotosDB:
# determine if a photo is missing in Photos 5
# Get info on remote/local availability for photos in shared albums
+ # Also get UTI of original image (zdatastoresubtype = 1)
c.execute(
f""" SELECT
{asset_table}.ZUUID,
ZINTERNALRESOURCE.ZLOCALAVAILABILITY,
- ZINTERNALRESOURCE.ZREMOTEAVAILABILITY
+ ZINTERNALRESOURCE.ZREMOTEAVAILABILITY,
+ ZINTERNALRESOURCE.ZDATASTORESUBTYPE,
+ ZINTERNALRESOURCE.ZUNIFORMTYPEIDENTIFIER,
+ ZUNIFORMTYPEIDENTIFIER.ZIDENTIFIER
FROM {asset_table}
JOIN ZADDITIONALASSETATTRIBUTES ON ZADDITIONALASSETATTRIBUTES.ZASSET = {asset_table}.Z_PK
JOIN ZINTERNALRESOURCE ON ZINTERNALRESOURCE.ZASSET = ZADDITIONALASSETATTRIBUTES.ZASSET
+ JOIN ZUNIFORMTYPEIDENTIFIER ON ZUNIFORMTYPEIDENTIFIER.Z_PK = ZINTERNALRESOURCE.ZUNIFORMTYPEIDENTIFIER
WHERE ZDATASTORESUBTYPE = 1 OR ZDATASTORESUBTYPE = 3 """
)
@@ -2076,8 +2085,11 @@ class PhotosDB:
uuid = row[0]
if uuid in self._dbphotos:
# and self._dbphotos[uuid]["isMissing"] is None:
+ # logging.warning(f"uuid={uuid}, {row[1]}, {row[2]} {row[3]}")
self._dbphotos[uuid]["localAvailability"] = row[1]
self._dbphotos[uuid]["remoteAvailability"] = row[2]
+ if row[3] == 1:
+ self._dbphotos[uuid]["UTI_original"] = row[5]
# old = self._dbphotos[uuid]["isMissing"]
@@ -2104,6 +2116,7 @@ class PhotosDB:
for row in c:
uuid = row[0]
if uuid in self._dbphotos:
+ # logging.warning(f"uuid={uuid}, {row[1]}, {row[2]}")
self._dbphotos[uuid]["localAvailability"] = row[1]
self._dbphotos[uuid]["remoteAvailability"] = row[2]
diff --git a/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite-shm b/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite-shm
index 50c5c9b8..3d8e0438 100644
Binary files a/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite-shm and b/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite-shm differ
diff --git a/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite-wal b/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite-wal
index e0ff2bd0..88518648 100644
Binary files a/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite-wal and b/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite-wal differ
diff --git a/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite.lock b/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite.lock
index 2a9cfd69..480501c1 100644
--- a/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite.lock
+++ b/tests/Test-10.15.6.photoslibrary/database/Photos.sqlite.lock
@@ -7,7 +7,7 @@
hostuuid
9575E48B-8D5F-5654-ABAC-4431B1167324
pid
- 18139
+ 2964
processname
photolibraryd
uid
diff --git a/tests/Test-10.15.6.photoslibrary/database/search/synonymsProcess.plist b/tests/Test-10.15.6.photoslibrary/database/search/synonymsProcess.plist
index f5ebcace..58e48cc1 100644
Binary files a/tests/Test-10.15.6.photoslibrary/database/search/synonymsProcess.plist and b/tests/Test-10.15.6.photoslibrary/database/search/synonymsProcess.plist differ
diff --git a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm
index 9ce80d6a..ddf44042 100644
Binary files a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm and b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm differ
diff --git a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm
index ad425f73..a6e01a6d 100644
Binary files a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm and b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm differ
diff --git a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm
index 0f9be3d3..5fd01404 100644
Binary files a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm and b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm differ
diff --git a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal
index 27ca9feb..fd9a5f60 100644
Binary files a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal and b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal differ
diff --git a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm
index e95273e7..0edff070 100644
Binary files a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm and b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm differ
diff --git a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-shm b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-shm
index 67ea6f6d..69218fab 100644
Binary files a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-shm and b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-shm differ
diff --git a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-wal b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-wal
index 2250fc1f..47c8e394 100644
Binary files a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-wal and b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-wal differ
diff --git a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm
index 0bcc8e62..dda17c2e 100644
Binary files a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm and b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm differ
diff --git a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal
index 3e60431d..4e26de8e 100644
Binary files a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal and b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal differ
diff --git a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb
index 78974f42..f6b8a764 100644
Binary files a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb and b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb differ
diff --git a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist
index 3d028a03..f35dce33 100644
Binary files a/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist and b/tests/Test-10.15.6.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist differ
diff --git a/tests/Test-10.15.6.photoslibrary/resources/derivatives/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266_1_105_c.jpeg b/tests/Test-10.15.6.photoslibrary/resources/derivatives/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266_1_105_c.jpeg
index 219d7c2e..1aed5919 100644
Binary files a/tests/Test-10.15.6.photoslibrary/resources/derivatives/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266_1_105_c.jpeg and b/tests/Test-10.15.6.photoslibrary/resources/derivatives/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266_1_105_c.jpeg differ
diff --git a/tests/Test-10.15.6.photoslibrary/resources/derivatives/masters/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266_4_5005_c.jpeg b/tests/Test-10.15.6.photoslibrary/resources/derivatives/masters/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266_4_5005_c.jpeg
index 93bbfc2a..ced2af2b 100644
Binary files a/tests/Test-10.15.6.photoslibrary/resources/derivatives/masters/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266_4_5005_c.jpeg and b/tests/Test-10.15.6.photoslibrary/resources/derivatives/masters/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266_4_5005_c.jpeg differ
diff --git a/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/3305.ithmb b/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/3305.ithmb
index a0754949..acd4974d 100644
Binary files a/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/3305.ithmb and b/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/3305.ithmb differ
diff --git a/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/4031.ithmb b/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/4031.ithmb
index bd6fe3b4..47c751f8 100644
Binary files a/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/4031.ithmb and b/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/4031.ithmb differ
diff --git a/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/4132.ithmb b/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/4132.ithmb
index 785d3c18..eeef704f 100644
Binary files a/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/4132.ithmb and b/tests/Test-10.15.6.photoslibrary/resources/derivatives/thumbs/4132.ithmb differ
diff --git a/tests/Test-10.15.6.photoslibrary/resources/journals/Asset-change.plj b/tests/Test-10.15.6.photoslibrary/resources/journals/Asset-change.plj
index 881b08d4..7d4df25e 100644
Binary files a/tests/Test-10.15.6.photoslibrary/resources/journals/Asset-change.plj and b/tests/Test-10.15.6.photoslibrary/resources/journals/Asset-change.plj differ
diff --git a/tests/Test-10.15.6.photoslibrary/resources/journals/HistoryToken.plist b/tests/Test-10.15.6.photoslibrary/resources/journals/HistoryToken.plist
index 7002df65..46dcaaa9 100644
Binary files a/tests/Test-10.15.6.photoslibrary/resources/journals/HistoryToken.plist and b/tests/Test-10.15.6.photoslibrary/resources/journals/HistoryToken.plist differ
diff --git a/tests/Test-10.15.6.photoslibrary/resources/renders/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266.plist b/tests/Test-10.15.6.photoslibrary/resources/renders/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266.plist
new file mode 100644
index 00000000..7f47da2b
--- /dev/null
+++ b/tests/Test-10.15.6.photoslibrary/resources/renders/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266.plist
@@ -0,0 +1,68 @@
+
+
+
+
+ adjustmentBaseVersion
+ 0
+ adjustmentData
+
+ bVdbt6I6s/0vvtqjFygo9BjfA0jCRbklXMSzzgMCEi6CChp0j/3fv7i6++zeYxzekqrM
+ mlUJqZm/Zo/iNlR9Z3anfvbjr9nxXrW5cz8fi9vsx4yX9fVy9m2WXi7RT7/35Ir/zn3n
+ FxwzDBkpzikqHtVPI/9tdmnT8dTfzszTxfvZ399m52JM83RM3/jndBiLW1zlI5n9WHIL
+ gS2oLkVbdcU/Edi67wJD/+lsFFVJxtkPgVsuvs36W1V0Yzr+DMfQ37HS8f8WMwZpXt+H
+ 8czchtmP//nr//EouvTYFvnsx3i7FyyLYhyrrhzeBPvTiQ13fZa2u59xuW+/Jg02bt9z
+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 GR/gVR7bqS2tjrvUFbiaVVlvcXizlsM8qHnHacKXX40LrTUxK4wD94q9oVKug+HU1AXr
+ EEZZnXFU7m7vi3cVgFvmZdO4hDolNVks4bbv7CqnEGRhR6UH2Er+hqienvWOOtlYa0CY
+ KkLI2lzsTTI1UnB+TUUOeeUYofain5W0RrA2rCbKpic2Oy6oSP4ErY136h5bbpKskRID
+ f0CDzxkQJa5H7AMUwkOppore0nLCgQbTJiabuIWHZJ+TQ6MJprP35UpbjPmSiqxh9k7k
+ f36gnZzh+3QyIWz8TSnt2REPdZSreiSchoncYZaMdaUlhkmPFakAEH10RFELDROHPh8A
+ WHqpssg0QcETlRvY00tHnjtD58ixlBONlqzXcp4e9aTE7hqKwr4kDxX24f5MElk3KWvj
+ DgFLwbPRloCicScq3rUnEwkErqA03LhNTHYXn//8eO7mxrV0NwpnaOFwHav702I9a0QW
+ gfs+SCen1zgBF6qrAtEOEQJzgAWP3aY7dqtGkMo+uJh+Sp4LbSEgf4IL4Ax+rQjsVwxd
+ rzKsrelHKZWu4JywfZYo6EIvpLwI9uEwIEhABPwUNUd219iaMj+CvRA2yOJ1ScnuvnzS
+ VCFI6Txjt6ejIkfVRzt7YdcwhSQIETiBqNk36iSB3g865Ny1rnesUqCgHZwExTWQbJw8
+ vSAooHVXFqWmhE7tz2PtOTgq5SyjbRB4dgiukoKtb8BB8Xa+vNX3wGPdEmvL0juVXKkt
+ +/8w6d++Bbjyp3xd/ku8chyTnpRUY/FLvvJv+fqH/H2/RPifwvgfSfxLIn+bEaY/t8Xz
+ bZa41VJgsp3pdlFeSdL679+KfNN34409Qf4Q6ZikeU/fCp15VTl7YlSn6uuphM/pbQz6
+ rpj9/b9//xc=
+
+ adjustmentEditorBundleID
+ com.apple.Photos
+ adjustmentFormatIdentifier
+ com.apple.photo
+ adjustmentFormatVersion
+ 1.5
+ adjustmentTimestamp
+ 2020-10-03T22:54:20Z
+
+
diff --git a/tests/Test-10.15.6.photoslibrary/resources/renders/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266_1_201_a.jpeg b/tests/Test-10.15.6.photoslibrary/resources/renders/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266_1_201_a.jpeg
new file mode 100644
index 00000000..b8b15f53
Binary files /dev/null and b/tests/Test-10.15.6.photoslibrary/resources/renders/7/7783E8E6-9CAC-40F3-BE22-81FB7051C266_1_201_a.jpeg differ
diff --git a/tests/test_catalina_10_15_6.py b/tests/test_catalina_10_15_6.py
index 7aa7ea8a..b592c223 100644
--- a/tests/test_catalina_10_15_6.py
+++ b/tests/test_catalina_10_15_6.py
@@ -95,6 +95,19 @@ ALBUM_SORT_ORDER = [
]
ALBUM_KEY_PHOTO = "D79B8D77-BFFC-460B-9312-034F2877D35B"
+UTI_DICT = {
+ "8846E3E6-8AC8-4857-8448-E3D025784410": "public.tiff",
+ "7783E8E6-9CAC-40F3-BE22-81FB7051C266": "public.jpeg",
+ "1EB2B765-0765-43BA-A90C-0D0580E6172C": "public.jpeg",
+}
+
+
+UTI_ORIGINAL_DICT = {
+ "8846E3E6-8AC8-4857-8448-E3D025784410": "public.tiff",
+ "7783E8E6-9CAC-40F3-BE22-81FB7051C266": "public.heic",
+ "1EB2B765-0765-43BA-A90C-0D0580E6172C": "public.jpeg",
+}
+
def test_init1():
# test named argument
@@ -1047,7 +1060,7 @@ def test_from_to_date():
photosdb = osxphotos.PhotosDB(PHOTOS_DB)
photos = photosdb.photos(from_date=dt.datetime(2018, 10, 28))
- assert len(photos) == 7
+ assert len(photos) == 7
photos = photosdb.photos(to_date=dt.datetime(2018, 10, 28))
assert len(photos) == 7
@@ -1178,3 +1191,15 @@ def test_import_session_photo():
)
assert len(import_session.photos) == 1
+
+def test_uti():
+ """ test uti """
+ import osxphotos
+
+ photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
+
+ for uuid, uti in UTI_DICT.items():
+ photo = photosdb.get_photo(uuid)
+ assert photo.uti == uti
+ assert photo.uti_original == UTI_ORIGINAL_DICT[uuid]
+
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 1e75c540..5c8854eb 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -101,6 +101,7 @@ CLI_EXPORT_FILENAMES_CONVERT_TO_JPEG = [
"IMG_1997.JPG",
"IMG_1997.cr2",
"IMG_3092.jpeg",
+ "IMG_3092_edited.jpeg",
"IMG_4547.jpg",
"Pumkins1.jpg",
"Pumkins2.jpg",
@@ -2894,7 +2895,7 @@ def test_export_touch_files():
)
assert result.exit_code == 0
- assert "Exported: 17 photos, touched date: 15 photos" in result.output
+ assert "Exported: 18 photos, touched date: 16 photos" in result.output
for fname, mtime in zip(CLI_EXPORT_BY_DATE, CLI_EXPORT_BY_DATE_TOUCH_TIMES):
st = os.stat(fname)
@@ -2926,7 +2927,7 @@ def test_export_touch_files_update():
)
assert result.exit_code == 0
- assert "Exported: 17 photos" in result.output
+ assert "Exported: 18 photos" in result.output
assert not pathlib.Path(CLI_EXPORT_BY_DATE[0]).is_file()
@@ -2936,7 +2937,7 @@ def test_export_touch_files_update():
)
assert result.exit_code == 0
- assert "Exported: 17 photos" in result.output
+ assert "Exported: 18 photos" in result.output
assert pathlib.Path(CLI_EXPORT_BY_DATE[0]).is_file()
@@ -2948,7 +2949,7 @@ def test_export_touch_files_update():
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 0 photos, skipped: 17 photos, updated EXIF data: 0 photos"
+ "Exported: 0 photos, updated: 0 photos, skipped: 18 photos, updated EXIF data: 0 photos"
in result.output
)
@@ -2966,7 +2967,7 @@ def test_export_touch_files_update():
)
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 0 photos, skipped: 17 photos, updated EXIF data: 0 photos, touched date: 15 photos"
+ "Exported: 0 photos, updated: 0 photos, skipped: 18 photos, updated EXIF data: 0 photos, touched date: 16 photos"
in result.output
)
@@ -2989,7 +2990,7 @@ def test_export_touch_files_update():
)
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 0 photos, skipped: 17 photos, updated EXIF data: 0 photos, touched date: 15 photos"
+ "Exported: 0 photos, updated: 0 photos, skipped: 18 photos, updated EXIF data: 0 photos, touched date: 16 photos"
in result.output
)
@@ -3015,7 +3016,7 @@ def test_export_touch_files_update():
)
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 1 photo, skipped: 16 photos, updated EXIF data: 0 photos, touched date: 1 photo"
+ "Exported: 0 photos, updated: 1 photo, skipped: 17 photos, updated EXIF data: 0 photos, touched date: 1 photo"
in result.output
)
@@ -3031,7 +3032,7 @@ def test_export_touch_files_update():
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 0 photos, skipped: 17 photos, updated EXIF data: 0 photos"
+ "Exported: 0 photos, updated: 0 photos, skipped: 18 photos, updated EXIF data: 0 photos"
in result.output
)
@@ -3062,7 +3063,7 @@ def test_export_touch_files_exiftool_update():
)
assert result.exit_code == 0
- assert "Exported: 17 photos" in result.output
+ assert "Exported: 18 photos" in result.output
assert not pathlib.Path(CLI_EXPORT_BY_DATE[0]).is_file()
@@ -3072,7 +3073,7 @@ def test_export_touch_files_exiftool_update():
)
assert result.exit_code == 0
- assert "Exported: 17 photos" in result.output
+ assert "Exported: 18 photos" in result.output
assert pathlib.Path(CLI_EXPORT_BY_DATE[0]).is_file()
@@ -3084,7 +3085,7 @@ def test_export_touch_files_exiftool_update():
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 0 photos, skipped: 17 photos, updated EXIF data: 0 photos"
+ "Exported: 0 photos, updated: 0 photos, skipped: 18 photos, updated EXIF data: 0 photos"
in result.output
)
@@ -3103,7 +3104,7 @@ def test_export_touch_files_exiftool_update():
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 17 photos, skipped: 0 photos, updated EXIF data: 17 photos"
+ "Exported: 0 photos, updated: 18 photos, skipped: 0 photos, updated EXIF data: 18 photos"
in result.output
)
@@ -3121,7 +3122,7 @@ def test_export_touch_files_exiftool_update():
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 17 photos, skipped: 0 photos, updated EXIF data: 17 photos"
+ "Exported: 0 photos, updated: 18 photos, skipped: 0 photos, updated EXIF data: 18 photos"
in result.output
)
@@ -3140,7 +3141,7 @@ def test_export_touch_files_exiftool_update():
)
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 0 photos, skipped: 17 photos, updated EXIF data: 0 photos, touched date: 17 photos"
+ "Exported: 0 photos, updated: 0 photos, skipped: 18 photos, updated EXIF data: 0 photos, touched date: 18 photos"
in result.output
)
@@ -3162,7 +3163,7 @@ def test_export_touch_files_exiftool_update():
)
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 0 photos, skipped: 17 photos, updated EXIF data: 0 photos, touched date: 17 photos"
+ "Exported: 0 photos, updated: 0 photos, skipped: 18 photos, updated EXIF data: 0 photos, touched date: 18 photos"
in result.output
)
@@ -3187,7 +3188,7 @@ def test_export_touch_files_exiftool_update():
)
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 1 photo, skipped: 16 photos, updated EXIF data: 1 photo, touched date: 1 photo"
+ "Exported: 0 photos, updated: 1 photo, skipped: 17 photos, updated EXIF data: 1 photo, touched date: 1 photo"
in result.output
)
@@ -3209,7 +3210,7 @@ def test_export_touch_files_exiftool_update():
)
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 0 photos, skipped: 17 photos, updated EXIF data: 0 photos, touched date: 0 photos"
+ "Exported: 0 photos, updated: 0 photos, skipped: 18 photos, updated EXIF data: 0 photos, touched date: 0 photos"
in result.output
)
@@ -3227,7 +3228,7 @@ def test_export_touch_files_exiftool_update():
assert result.exit_code == 0
assert (
- "Exported: 0 photos, updated: 0 photos, skipped: 17 photos, updated EXIF data: 0 photos"
+ "Exported: 0 photos, updated: 0 photos, skipped: 18 photos, updated EXIF data: 0 photos"
in result.output
)