@tbouron said in MMM-Sonos - Display what is currently playing on your Sonos network:
I assume you are talking about the second line for artist
and album
right? I already have sort of partial fix for that (not displaying the album if null
). I could do the same thing for the artist
. When you are using airplay, is the first line displayed correctly? What does it say? I unfortunately cannot know if something comes through airplay or not, it’s all unified through the Sonos library.
I checked that more. And it looks if I share a song from iTunes via AirPlay, it provides all necessary information, so the data is correct. But if I use YouTube, then it is empty. Song name is just empty, and both singer and album names are displayed as (null).
That would be a bug in the underlying Sonos library. I just listening for events and display whatever comes from there.
That’s bad. :( As I can see, sometimes it just gets crazy. Shows me up instances of the same, when only one group plays. Looks like the library behind node-http-sonos-api required for another modules of the same type is more stable currently.
The Sonos library doesn’t give me this information unfortunately so that won’t be possible to do for now.
I believe it gives in fact. As I can see from Sonos module, its class SonosGroup contains Members. I believe it can be used to count number of members in the current group, and if there is more than one, not output the volume. Alternatively, I believe it should be possible to extract exact names of members from the Group to construct a more user-friendly custom name to use in metadata (i.e. not “Kitchen+2”, but “Kitchen, Corridor, Bathroom”).