diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-23 11:05:20 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-23 11:05:20 +1000 |
| commit | 1eb16c8f97332bc63103dae6f2ac1fb46a168445 (patch) | |
| tree | f1e10bbbe46b82b7e0b2ec852eaa5b1351424bc4 /pywal/image.py | |
| parent | 377cc7e68ce2576ad928fdd6efb40cabdf0f19dc (diff) | |
api: More changes.
Diffstat (limited to 'pywal/image.py')
| -rw-r--r-- | pywal/image.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/pywal/image.py b/pywal/image.py index 44b82f2..3f28923 100644 --- a/pywal/image.py +++ b/pywal/image.py @@ -7,15 +7,13 @@ import random from .settings import __cache_dir__ from . import util +from . import wallpaper def get_random_image(img_dir, cache_dir): """Pick a random image file from a directory.""" - current_wall = cache_dir / "wal" - - if current_wall.is_file(): - current_wall = util.read_file(current_wall) - current_wall = os.path.basename(current_wall[0]) + current_wall = wallpaper.get() + current_wall = os.path.basename(current_wall[0]) file_types = (".png", ".jpg", ".jpeg", ".jpe", ".gif") images = [img for img in os.scandir(img_dir) |
