client.py: Suffixes of image files are also allowed to be in upper case

master
Felix Stupp 4 years ago
parent 5b0bcdad2c
commit 4f9a64faf8
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -15,7 +15,7 @@ binding_back = [ord('h'), ord('q'), curses.KEY_BACKSPACE]
binding_exit = [ord('Q')] binding_exit = [ord('Q')]
def show_pictures(path): def show_pictures(path):
files = sorted([str(f) for f in path.iterdir() if f.is_file() and f.suffix in ['.png', '.jpg', '.jpeg', '.gif']]) files = sorted([str(f) for f in path.iterdir() if f.is_file() and f.suffix.lower() in ['.png', '.jpg', '.jpeg', '.gif']])
files.insert(0, '/usr/bin/imvr') files.insert(0, '/usr/bin/imvr')
subprocess.call(files) subprocess.call(files)
return True return True

Loading…
Cancel
Save