vishen / go-chromecast

cli for Google Chromecast, Home devices and Cast Groups
Apache License 2.0
853 stars 84 forks source link

fix: React to `CLOSE` messages #167

Closed gabe565 closed 1 year ago

gabe565 commented 1 year ago

It seems like all Cast devices send a CLOSE message when the stream is stopped. Most devices also unset media info, but some devices (In my case, an older Sony XBR-55X850D TV) will respond in a way that causes application, media, and volumeReceiver to not get unset. This PR makes those values get set to nil if a CLOSE message occurs. I'm pretty new to the Cast API so this may not be the best way to handle this. Let me know what you think!

vishen commented 1 year ago

Amazing, thanks!