Compare commits
2 Commits
b9444658fb
...
4617f83f5c
Author | SHA1 | Date |
---|---|---|
Daniel Lovbrotte Olsen | 4617f83f5c | |
Daniel Lovbrotte Olsen | 047d09ffb1 |
|
@ -170,10 +170,11 @@ def set_volume(
|
||||||
if volume.startswith("+") or volume.startswith("-"):
|
if volume.startswith("+") or volume.startswith("-"):
|
||||||
current_volume = api.get_volume()
|
current_volume = api.get_volume()
|
||||||
new_volume = max(0, min(100, current_volume + int(volume)))
|
new_volume = max(0, min(100, current_volume + int(volume)))
|
||||||
|
new_volume = int(new_volume)
|
||||||
else:
|
else:
|
||||||
new_volume = int(volume)
|
new_volume = int(volume)
|
||||||
|
|
||||||
rich.print(api.set_volume(volume), file=sys.stderr)
|
rich.print(api.set_volume(new_volume), file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue