Fixed unnecessary warning exporting .JPG to .jpeg

This commit is contained in:
Rhet Turnbull
2020-03-22 09:02:10 -07:00
parent aeae1e0b8a
commit d26ea0dccc

View File

@@ -618,10 +618,8 @@ class PhotoInfo:
# warn if suffixes don't match but ignore .JPG / .jpeg as # warn if suffixes don't match but ignore .JPG / .jpeg as
# Photo's often converts .JPG to .jpeg # Photo's often converts .JPG to .jpeg
if dest.suffix != actual_suffix and sorted([dest.suffix, actual_suffix]) != [ suffixes = sorted([x.lower() for x in [dest.suffix, actual_suffix]])
".JPG", if dest.suffix != actual_suffix and suffixes != [".jpeg", ".jpg"]:
".jpeg",
]:
logging.warning( logging.warning(
f"Invalid destination suffix: {dest.suffix}, should be {actual_suffix}" f"Invalid destination suffix: {dest.suffix}, should be {actual_suffix}"
) )