From 961759d49f0da67032c066e8f1878c003e98cf43 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 28 Nov 2025 05:24:34 +0100 Subject: Hide zero f / F values (e.g. when using a manual lens) --- bin/pyggle | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/pyggle b/bin/pyggle index 5032f3b..fb167f3 100755 --- a/bin/pyggle +++ b/bin/pyggle @@ -137,7 +137,7 @@ class ImageHTML: self, f_num, exposure, focal_length, focal_length35, crop_factor, iso ): entries = list() - if f_num is not None: + if f_num is not None and float(f_num) > 0: self.f_num = f"""f/{format_f(f_num)}""" entries.append(self.f_num) @@ -156,7 +156,7 @@ class ImageHTML: ) entries.append(self.exposure) - if focal_length is not None: + if focal_length is not None and float(focal_length) > 0: entry = f"{format_f(focal_length)}mm" if focal_length35 is not None and focal_length35 != focal_length: entry += f" (≙ {format_f(focal_length35)}mm)" @@ -595,6 +595,9 @@ class Thumbnail: location_cache[latlon][str(args.nominatim_zoom)] = location except TypeError as e: location = latlon + except Exception as e: + print(e) + return self.gps = GPSData(lat, lon, location) self.html.set_gps(self.gps) @@ -613,7 +616,7 @@ class Thumbnail: try: lens = self.exif_tag["EXIF LensModel"] - if lens: + if lens and str(lens): model += f" + {lens}" except KeyError: # Unknown or built-in lens -- cgit v1.2.3