Fixed unnecessary warning exporting .JPG to .jpeg
This commit is contained in:
@@ -616,7 +616,12 @@ class PhotoInfo:
|
||||
# use suffix from the non-edited file
|
||||
actual_suffix = pathlib.Path(self.filename).suffix
|
||||
|
||||
if dest.suffix != actual_suffix:
|
||||
# warn if suffixes don't match but ignore .JPG / .jpeg as
|
||||
# Photo's often converts .JPG to .jpeg
|
||||
if dest.suffix != actual_suffix and sorted([dest.suffix, actual_suffix]) != [
|
||||
".JPG",
|
||||
".jpeg",
|
||||
]:
|
||||
logging.warning(
|
||||
f"Invalid destination suffix: {dest.suffix}, should be {actual_suffix}"
|
||||
)
|
||||
|
||||
@@ -218,6 +218,8 @@ def get_last_library_path():
|
||||
|
||||
if photosurlref is not None:
|
||||
# use CFURLCreateByResolvingBookmarkData to de-serialize bookmark data into a CFURLRef
|
||||
# pylint: disable=no-member
|
||||
# pylint: disable=undefined-variable
|
||||
photosurl = CoreFoundation.CFURLCreateByResolvingBookmarkData(
|
||||
kCFAllocatorDefault, photosurlref, 0, None, None, None, None
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user