[Sound] Don't override device index if it's already defined in the info.

This commit is contained in:
Fabio Manganiello 2024-01-08 23:03:08 +01:00
parent b097a4c1f4
commit 4505c46071
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -51,7 +51,9 @@ class DeviceManager:
if type: if type:
devices = [dev for dev in devices if dev.get(f'max_{type.value}_channels')] devices = [dev for dev in devices if dev.get(f'max_{type.value}_channels')]
return [AudioDevice(index=idx, **info) for idx, info in enumerate(devices)] return [
AudioDevice(**{'index': idx, **info}) for idx, info in enumerate(devices)
]
def get_device( def get_device(
self, self,