diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-17 13:29:25 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-17 13:29:25 +1000 |
| commit | 3416178ad4bff27e6973940aa6fc1a11d366050b (patch) | |
| tree | 92fb934a851f0d7bdf84aff379051655e13dbb40 /src/caelestia/utils/material | |
| parent | scheme: error notif critical urgency (diff) | |
| download | caelestia-cli-3416178ad4bff27e6973940aa6fc1a11d366050b.tar.gz caelestia-cli-3416178ad4bff27e6973940aa6fc1a11d366050b.tar.bz2 caelestia-cli-3416178ad4bff27e6973940aa6fc1a11d366050b.zip | |
wallpaper: fix print command
Diffstat (limited to 'src/caelestia/utils/material')
| -rw-r--r-- | src/caelestia/utils/material/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/caelestia/utils/material/__init__.py b/src/caelestia/utils/material/__init__.py index f7f7f3d..447a952 100644 --- a/src/caelestia/utils/material/__init__.py +++ b/src/caelestia/utils/material/__init__.py @@ -32,8 +32,10 @@ def get_colours_for_image(image: Path | str = wallpaper_thumbnail_path, scheme=N scheme = get_scheme() + flavour = scheme.flavour if scheme.flavour in ("default", "alt1", "alt2") else "default" + cache_base = scheme_cache_dir / compute_hash(image) - cache = (cache_base / scheme.variant / scheme.flavour / scheme.mode).with_suffix(".json") + cache = (cache_base / scheme.variant / flavour / scheme.mode).with_suffix(".json") try: with cache.open("r") as f: @@ -42,7 +44,7 @@ def get_colours_for_image(image: Path | str = wallpaper_thumbnail_path, scheme=N pass primaries, colours = get_score_for_image(image, cache_base) - i = ["default", "alt1", "alt2"].index(scheme.flavour) + i = ["default", "alt1", "alt2"].index(flavour) scheme = gen_scheme(scheme, primaries[i], colours) cache.parent.mkdir(parents=True, exist_ok=True) |