bencevans / node-sonos

🔈 Sonos Media Player Interface/Client
https://www.npmjs.com/package/sonos
MIT License
703 stars 147 forks source link

Fix albumarturl errors #525

Open kcghost opened 2 years ago

kcghost commented 2 years ago

Fixes #516. That is, unless there is another albumArtURI parsing error root cause besides the one I found. I had a DLNA played track on my network that caused this error in a very reproducible manner.

The first change handles the error itself, the other is a change to swallow an error in CurrentTrack if a different parsing error occurs (make it do its best rather than fail out). I imagine whether you wish to accept the second depends largely on your philosophy. I just know that the way sonos-web uses this project, all of sonos-web becomes unusable if this error occurs on any sonos host. I would rather it fail to display the albumart than fail to do anything at all.