From: Christian Heller Date: Tue, 27 Aug 2024 11:51:08 +0000 (+0200) Subject: Remove randomness sorting. X-Git-Url: https://plomlompom.com/repos/task?a=commitdiff_plain;h=867b0448ef8f10d298826ca3e394fb3153448c0d;p=stable_plom Remove randomness sorting. --- diff --git a/browser.py b/browser.py index 266a620..67e41cb 100755 --- a/browser.py +++ b/browser.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 from json import dump as json_dump, load as json_load from os.path import exists as path_exists, join as path_join, abspath -from random import shuffle from operator import attrgetter from exiftool import ExifToolHelper # type: ignore import gi # type: ignore @@ -16,7 +15,6 @@ from stable.gen_params import (GenParams, # noqa: E402 IMG_DIR = '.' CACHE_PATH = 'cache.json' -SORT_KEY_RANDOM = 'randomize' class SortLabelItem(GObject.GObject): @@ -147,10 +145,6 @@ class Window(Gtk.ApplicationWindow): def sort(self): self.list_store.remove_all() for key in self.sort_order: - if SORT_KEY_RANDOM == key: - shuffle(self.unsorted_files) - shuffle(self.unsorted_dirs) - continue self.unsorted_files.sort(key=attrgetter(key)) if key in {'name', 'last_mod_time'}: self.unsorted_dirs.sort(key=attrgetter(key))