From: Christian Heller Date: Thu, 22 Aug 2024 07:39:01 +0000 (+0200) Subject: In image browser, properly parse GenParams for more readable display. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7Bprefix%7D%7D/balance2?a=commitdiff_plain;h=d0b415216b24614d859a82b07c3eefdd265fd705;p=stable_plom In image browser, properly parse GenParams for more readable display. --- 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)