mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-29 11:24:03 +01:00
image: Fixed bug causing shuffle to use duplicate images
This commit is contained in:
parent
5ffcaafe82
commit
24ae58d942
@ -13,7 +13,7 @@ from . import wallpaper
|
|||||||
def get_random_image(img_dir):
|
def get_random_image(img_dir):
|
||||||
"""Pick a random image file from a directory."""
|
"""Pick a random image file from a directory."""
|
||||||
current_wall = wallpaper.get()
|
current_wall = wallpaper.get()
|
||||||
current_wall = os.path.basename(current_wall[0])
|
current_wall = os.path.basename(current_wall)
|
||||||
|
|
||||||
file_types = (".png", ".jpg", ".jpeg", ".jpe", ".gif")
|
file_types = (".png", ".jpg", ".jpeg", ".jpe", ".gif")
|
||||||
images = [img for img in os.scandir(img_dir)
|
images = [img for img in os.scandir(img_dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user