Acidham / alfred-airpod-connector

Alfred Workflow to connect/disconnect AirPods (Airpod1/2, Airpod Pro) and Powerbeats Pro
35 stars 7 forks source link

blueutil seems to return different key names #23

Open naven87 opened 5 months ago

naven87 commented 5 months ago

I'm running blueutil 2.9.1, which is the latest brew installed. When I run the command the JSON which gets returned for "os.popen('system_profiler SPBluetoothDataType -json'" seems to have the keys dict_keys(['controller_properties', 'device_paired']), not 'devices_list'. Not sure if that is a recent change or something else is going on.

Acidham commented 5 months ago

What macOS version are you using?

macOS < 12.3 it is device_list otherwise device_connected resp. device_not_connected. I am not aware of device_paired property.

naven87 commented 5 months ago

This is on 14 Beta, so maybe not something that is in the wild yet. I don't see the device_not_connected property only device_connected and device_paired. So maybe something to keep in your back pocket if this gets released this way.

Also I missed that you had already accommodated a 12.3 change, so the issue wasn't with device_list, it was with device_not_connected in the exception handling section. At least for me that seems to now be device_paired.

Acidham commented 5 months ago

Ok thank you for heads up.

Not sure why Apple is always changing that...fun!?