image: Fix shuffle not working with some file types

This commit is contained in:
dylan araps 2017-10-29 20:29:01 +11:00
parent ac0fdb9906
commit c07ac01d6c

View File

@ -15,7 +15,9 @@ def get_random_image(img_dir):
current_wall = wallpaper.get()
current_wall = os.path.basename(current_wall)
file_types = (".png", ".jpg", ".jpeg", ".jpe", ".gif")
file_types = (".png", ".jpg", ".jpeg", ".jpe", ".gif",
".PNG", ".JPG", ".JPEG", ".JPE", ".GIF")
images = [img for img in os.scandir(img_dir)
if img.name.endswith(file_types) and img.name != current_wall]