first one is to change the way to parse audio volumes.
second one is to unified the format string method.
And it has been tested on my laptop with stereo and mono audio devices.
the stereo logs:
>>> print(get_audio_settings("source"))
{'name': 'alsa_input.pci-0000_00_1f.3.analog-stereo', 'muted': 'no', 'volumes': {'front-left': 26, 'front-right': 26}, 'max_volume': 26}
>>> print(get_audio_settings("sink"))
{'name': 'alsa_output.pci-0000_00_1f.3.hdmi-stereo-extra1', 'muted': 'no', 'volumes': {'front-left': 88, 'front-right': 88}, 'max_volume': 88}
Two commits for this MR.
first one is to change the way to parse audio volumes.
second one is to unified the format string method.
And it has been tested on my laptop with stereo and mono audio devices. audio_settings( "source" )) pci-0000_ 00_1f.3. analog- stereo' , 'muted': 'no', 'volumes': {'front-left': 26, 'front-right': 26}, 'max_volume': 26} audio_settings( "sink") ) pci-0000_ 00_1f.3. hdmi-stereo- extra1' , 'muted': 'no', 'volumes': {'front-left': 88, 'front-right': 88}, 'max_volume': 88}
the stereo logs:
>>> print(get_
{'name': 'alsa_input.
>>> print(get_
{'name': 'alsa_output.
the mono logs: audio_settings( "source" )) source. 74_5C_4B_ D4_EB_94. headset_ head_unit' , 'muted': 'no', 'volumes': {'mono': 59}, 'max_volume': 59} audio_settings( "sink") ) sink.74_ 5C_4B_D4_ EB_94.headset_ head_unit' , 'muted': 'no', 'volumes': {'mono': 69}, 'max_volume': 69}
>>> print(get_
{'name': 'bluez_
>>> print(get_
{'name': 'bluez_