Open Fl1tzi opened 2 years ago
Good news! With Pulseaudio 16.0, pactl finally supports directly outputting json which would not break this. That would fix this for system with an updated Pulseaudio version.
As Pulseaudio 16.0 is not yet released in most distros, I wrote a wrapper to JSON myself, so closing this
This bug was created using the conversation with
Giovanni Gelijns#5347
on Discord. Conversation: https://discord.com/channels/897428802412613632/922913613369454622/975418884108742776bug The output of
pmctl list sinks
should be the normal json, but if there is a#
in the description (would probably also apply to all other fields) then the shell scripts splits it as thinking it is a new index, which results in a broken json return.file which runs this: main/scripts/pmctl
broken json
```json { "id": 49, "name": "alsa_output.pci-0000_00_1f.3.analog-stereo", "description": "Built-in Audio Analog Stereo", "volume": 60 }, { "id": 835, "name": "alsa_output.usb-Astro_Gaming_Astro_A50-00.stereo-game", "description": "Astro A50 Game", "volume": 100 }, { "id": 836, "name": "alsa_output.usb-Astro_Gaming_Astro_A50-00.stereo-chat", "description": "Astro A50 Chat", "volume": 100 }, { "id": 1899, "name": "bluez_output.34_81_F4_F4_41_C9.a2dp-sink", "description": "SOUNDBOKS }, { "id": 003110, "volume": 100 } ```fixed json
```json { "id": 49, "name": "alsa_output.pci-0000_00_1f.3.analog-stereo", "description": "Built-in Audio Analog Stereo", "volume": 60 }, { "id": 835, "name": "alsa_output.usb-Astro_Gaming_Astro_A50-00.stereo-game", "description": "Astro A50 Game", "volume": 100 }, { "id": 836, "name": "alsa_output.usb-Astro_Gaming_Astro_A50-00.stereo-chat", "description": "Astro A50 Chat", "volume": 100 }, { "id": 1899, "name": "bluez_output.34_81_F4_F4_41_C9.a2dp-sink", "description": "SOUNDBOKS #003110" "volume": 100 } ```Desktop (please complete the following information):
Additional context Look at the conversation for additional data.