From 047d09ffb100aaa89938342cdc41f2b2f7d99ab3 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Sat, 25 May 2024 23:58:08 +0200 Subject: [PATCH] cli: fix relative volume adjustment --- grzegorz_clients/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grzegorz_clients/cli.py b/grzegorz_clients/cli.py index 7adb11e..7541be6 100644 --- a/grzegorz_clients/cli.py +++ b/grzegorz_clients/cli.py @@ -170,10 +170,11 @@ def set_volume( if volume.startswith("+") or volume.startswith("-"): current_volume = api.get_volume() new_volume = max(0, min(100, current_volume + int(volume))) + new_volume = int(new_volume) else: 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__": -- 2.44.2