home · contact · privacy
In image browser, properly parse GenParams for more readable display.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 22 Aug 2024 07:39:01 +0000 (09:39 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 22 Aug 2024 07:39:01 +0000 (09:39 +0200)
browser.py

index b062d1db4f2e6de6e77f3660a100bc45639fa237..cf597642486b92c60448b776bd4874d006e5e2b3 100755 (executable)
@@ -2,6 +2,7 @@
 from os import scandir
 from os.path import splitext
 from exiftool import ExifToolHelper  # type: ignore
+from stable.gen_params import GenParams
 import gi
 gi.require_version('Gtk', '4.0')
 # pylint: disable=wrong-import-position
@@ -58,7 +59,10 @@ class Window(Gtk.ApplicationWindow):
                 for d in et.get_tags([path], ['Comment']):
                     for k, v in d.items():
                         if k.endswith('Comment'):
-                            metadata = v
+                            metadata = ''
+                            gen_params = GenParams.from_str(v)
+                            for k, v_ in gen_params.as_dict.items():
+                                metadata += f'\n{k}: {v_}'
             self.metadata.props.label = f'{path}: {metadata}'
             pic = Gtk.Picture.new_for_filename(path)
             self.box_outer.append(pic)