philippe44 / AirConnect

Use AirPlay to stream to UPnP/Sonos & Chromecast devices
Other
3.55k stars 218 forks source link

"Too many Cast devices" #280

Closed fresnoboy closed 3 years ago

fresnoboy commented 4 years ago

Hi.... This looks like a great package, but I have 38 Cast devices (20 Chromecast audios driving a whole house audio system, 8 Shield TV's, and a set of Google hubs in every room), so when I fire the app up I get "too many Cast devices" as an error on startup.

This will be made worse by speaker groups as well, so I would suggest making the max cast device count 50 or more unless that creates problems with the code. Cast is become very common, so large homes or college networks where classroom projectors are being driven by Chromecast argue for much larger device counts as normal.

fresnoboy commented 3 years ago

Is there any reason to not increase the max device limit? I can form and build my own version but that seems a bit pointless. :)

philippe44 commented 3 years ago

it's because some searches are looping through an array of devices contexts a I did not want to do a linked list (for some other reasons). So doubling that max length will double all searches even if you have two devices. I understand your point, but having 38 Cast devices is extreme

philippe44 commented 3 years ago

So ... although I still think this is an insane amount of players, I've made the max a parameters. See \<max_players>

fresnoboy commented 3 years ago

Thanks. With more and more devices google enabled, this change is useful.