fix: clamp volume input between 0 and 100
Co-authored-by: aider (gemini/gemini-3.1-pro-preview) <aider@aider.chat>
This commit is contained in:
@@ -119,7 +119,7 @@ def handle_ipc_client(conn, state):
|
|||||||
if prop == "pause":
|
if prop == "pause":
|
||||||
state.paused = bool(val)
|
state.paused = bool(val)
|
||||||
elif prop == "volume":
|
elif prop == "volume":
|
||||||
state.volume = float(val)
|
state.volume = max(0.0, min(100.0, float(val)))
|
||||||
elif prop == "time-pos":
|
elif prop == "time-pos":
|
||||||
state.seek_request = float(val)
|
state.seek_request = float(val)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user