noelhibbard / node-airplayhub

AirPlay server which accepts streams and then streams the audio back out to multiple AirPlay devices with sync support.
51 stars 12 forks source link

Auto discovery of Airplay devices #4

Closed djm300 closed 7 years ago

djm300 commented 7 years ago

I added a rough POC to populate the ./config.json with detected Airplay devices. If devices drop off, the code does not delete them from the web gui / the zones array.

Note: this requires the bonjour package.

noelhibbard commented 7 years ago

I like this. Something I wanted to add at some point anyways. The only thing I would like to do is add an additional config option to hide devices. At my house for example there are some devices that I never use for music so I exclude them from my config. I will merge this pull and then add the additional config option.

Thanks for contributing!

noelhibbard commented 7 years ago

Okay I merged and then made a few changes. I noticed you were using the hostnames as the zone names. I changed it to use the advertized "name" for the zone name. I also added logic to ignore node-airplayhub. No need for a feedback loop. Hehe. I also added a hidden option to zones so you can hide zones you don't want on the list. You can also show/hide zones with these URLs: /hidezone/[zonename] /showzone/[zonename]

Oh and the config file will now self generate if the file doesn't exist. This, along with your contribution should make initial configuration dummy proof. Thanks again for your help!