mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-25 09:23:08 +01:00
Print found directories
TODO: Move to different method, since this way lower depth images are preferred
This commit is contained in:
parent
c823e3c9db
commit
e10337c838
@ -31,7 +31,10 @@ def get_random_image(img_dir):
|
|||||||
images.remove(current_wall)
|
images.remove(current_wall)
|
||||||
|
|
||||||
elif not images:
|
elif not images:
|
||||||
logging.error("No images found in directory.")
|
logging.error("No images found in directory, picking random directory.")
|
||||||
|
logging.info("Found dirs: {}".format([dir_file.name for dir_file in
|
||||||
|
os.scandir(img_dir)]))
|
||||||
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
random.shuffle(images)
|
random.shuffle(images)
|
||||||
@ -59,7 +62,7 @@ def get_next_image(img_dir):
|
|||||||
return os.path.join(img_dir, image)
|
return os.path.join(img_dir, image)
|
||||||
|
|
||||||
|
|
||||||
def get(img, cache_dir=CACHE_DIR, iterative=False):
|
def get(img, cache_dir=CACHE_DIR, iterative=False, recursive=False):
|
||||||
"""Validate image input."""
|
"""Validate image input."""
|
||||||
if os.path.isfile(img):
|
if os.path.isfile(img):
|
||||||
wal_img = img
|
wal_img = img
|
||||||
|
Loading…
Reference in New Issue
Block a user