From 4505c460719993ce3086b5f49a02852556540161 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 8 Jan 2024 23:03:08 +0100 Subject: [PATCH] [Sound] Don't override device index if it's already defined in the info. --- platypush/plugins/sound/_manager/_device.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platypush/plugins/sound/_manager/_device.py b/platypush/plugins/sound/_manager/_device.py index 082634672..bce2c1fa1 100644 --- a/platypush/plugins/sound/_manager/_device.py +++ b/platypush/plugins/sound/_manager/_device.py @@ -51,7 +51,9 @@ class DeviceManager: if type: 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( self,