fix default output/input not set
This commit is contained in:
parent
ffac7ee2c0
commit
e55955d976
@ -409,6 +409,12 @@ def change_audio_config(connection: Connection, volume: int, mute: bool, input_d
|
|||||||
return device['name']
|
return device['name']
|
||||||
return user_device
|
return user_device
|
||||||
|
|
||||||
|
# Set default sink and source if not specified
|
||||||
|
if not output_device:
|
||||||
|
output_device = "@DEFAULT_SINK@"
|
||||||
|
if not input_device:
|
||||||
|
input_device = "@DEFAULT_SOURCE@"
|
||||||
|
|
||||||
# Set default sink if specified
|
# Set default sink if specified
|
||||||
if output_device and output_device != "@DEFAULT_SINK@":
|
if output_device and output_device != "@DEFAULT_SINK@":
|
||||||
output_device = get_device_id('sinks', output_device)
|
output_device = get_device_id('sinks', output_device)
|
||||||
|
Loading…
Reference in New Issue
Block a user