aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rossi <alexandre.rossi@gmail.com>2019-07-04 16:12:21 +0200
committerAlexandre Rossi <alexandre.rossi@gmail.com>2019-07-04 16:12:21 +0200
commit323ffd8337bdff5070385cc49e59b8dd07651cf1 (patch)
tree578f9e91d25648c8701200de192b66b8cd76cd74
parent9b99dd115f90dbacdeaf43f8d965e1ed3dde3b98 (diff)
downloadlazygal-323ffd8337bdff5070385cc49e59b8dd07651cf1.zip
lazygal-323ffd8337bdff5070385cc49e59b8dd07651cf1.tar.bz2
focal length: do not add 35mm equivalent if it's the same
-rw-r--r--lazygal/metadata.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lazygal/metadata.py b/lazygal/metadata.py
index b91b4dd..f102160 100644
--- a/lazygal/metadata.py
+++ b/lazygal/metadata.py
@@ -337,7 +337,8 @@ class ImageInfoTags(object):
except KeyError:
pass
else:
- flen += _(' (35 mm equivalent: %s mm)') % flen35
+ if flen35 != flen:
+ flen += _(' (35 mm equivalent: %s mm)') % flen35
return flen
try:
@@ -365,7 +366,8 @@ class ImageInfoTags(object):
except ZeroDivisionError:
raise ValueError
- flen += _(' (35 mm equivalent: %s mm)') % lenstr
+ if lenstr != flen:
+ flen += _(' (35 mm equivalent: %s mm)') % lenstr
except (IndexError, KeyError, ValueError):
return flen