From d0b415216b24614d859a82b07c3eefdd265fd705 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Thu, 22 Aug 2024 09:39:01 +0200
Subject: [PATCH] In image browser, properly parse GenParams for more readable
 display.

---
 browser.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/browser.py b/browser.py
index b062d1d..cf59764 100755
--- a/browser.py
+++ b/browser.py
@@ -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)
-- 
2.30.2