Skip to content

Commit

Permalink
Fixed 100% media volume
Browse files Browse the repository at this point in the history
Removed getting new information after control
  • Loading branch information
bkbilly committed Sep 26, 2023
1 parent 3f1034c commit cabf293
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lnxlink/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ def on_message(self, client, userdata, msg):
f"{self.pref_topic}/command_result/{topic.strip('/')}"
)
self.client.publish(result_topic, payload=result, retain=False)
self.monitor_run()
except Exception as err:
logger.error(err)

Expand Down
2 changes: 1 addition & 1 deletion lnxlink/modules/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def start_control(self, topic, data):
"""Control system"""
if topic[1] == "volume_set":
mixer = alsaaudio.Mixer()
if data < 1:
if data <= 1:
data *= 100
data = min(data, 100)
mixer.setvolume(int(data))
Expand Down

0 comments on commit cabf293

Please sign in to comment.