home · contact · privacy
Browser.py: For by_1st layout, ignore single-value sorters.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 24 Oct 2024 11:21:42 +0000 (13:21 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 24 Oct 2024 11:21:42 +0000 (13:21 +0200)
browser.py

index 0b8e9d7c22df4a6e4514bbe68efb68be6e9cf770..223f118d1d7e44c10448c08626ae48bfbf38b81e 100755 (executable)
@@ -816,8 +816,9 @@ class Gallery:
                 self._show_dirs = False
                 sort_attrs = []
                 for sorter in reversed(self._sort_order):
-                    sort_attrs += [(sorter.name,
-                                    self.items_attrs[sorter.name]['incl'])]
+                    vals = self.items_attrs[sorter.name]['incl']
+                    if len(vals) > 1:
+                        sort_attrs += [(sorter.name, vals)]
                 self._per_row = len(sort_attrs[-1][1])
                 build_rows_by_attrs(sort_attrs, entries_filtered)
             else: