Skip to content

Commit e317ffd

Browse files
authored
fix: fix resolution parsing with upper x (#157)
If you have set your resolution with an upper `x` like `1920X1080` instead of a lower one like `1920x1080` you end up with a crash. This PR makes sure to lower the resolution string before parsing. Signed-off-by: Patrick Gehrsitz <github@mryel.de>
1 parent c7c04ee commit e317ffd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spyglass/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def parse_autofocus_speed(arg_value: str) -> libcamera.controls.AfSpeedEnum:
161161

162162

163163
def split_resolution(res: str) -> tuple[int, int]:
164-
parts = res.split("x")
164+
parts = res.lower().split("x")
165165
w = int(parts[0])
166166
h = int(parts[1])
167167
return w, h

0 commit comments

Comments
 (0)