Media Player shows some, but not all, cover art from Sonos Music Library

Seeing some odd behavior when clicking the “browse” button in the media player and selecting “Albums”. The albums are displayed, but not all of them show their cover art. Curiously, if I look at the underlying html for an album with no art, I see an element like this: <ha-card outlined style="background-image:url(http://xx.xx.xx.xx:1400/getaa?u=x-file-cifs%3a%2f%2fDiskstation720%2fiTunes%2fiTunes%2fiTunes%2520Media%2fMusic%2fThe%2520Beatles%2fA%2520Hard%2520Day's%2520Night%2f01%2520A%2520Hard%2520Day's%2520Night.m4a&v=373);">…</ha-card>, where “xx.xx.xx.xx” is the local address of my Sonos device. Grabbing just the link from the element and pasting that into a browser downloads the art just fine. Browsing the albums in the Sonos app works just fine, both on my Mac and my phone. I’ve tried re-embedding the art in the files in different formats - .jpg and .png. I’ve tried re-indexing the Library afterward and I’ve tried refreshing the browser and re-starting HASS. Always the same result, however. I’ve used ffprobe to look at the embedded artwork and it seems to be the same as for other albums that display properly. Even more curiously, the art is properly displayed on the Media Player once the album is selected - and it appears to use the same “http://…” link as the “Albums” browser uses. I’m out of ideas - please help.

Are you on your local network (and can directly connect to your Sonos devices) when using the media browser?

Cover art can be in an external file or embedded in the media file.
The ones you might see is the ones with it embedded and you may then have issues with accessing the external files.

Thanks, but they are all embedded - no external files.

jjlawren: Yes; on local network. I can actually PLAY the album just fine; it just doesn’t show the art in the browser. Also, upgraded to 2022.2.5 today, but no change.

BUMP Still seeing this behavior in 2022.3.5. The HTML has changed between releases and now looks like this:

<div class=" image lazythumbnail" data-src="http://xx.xx.xx.xx:1400/getaa?u=x-file-cifs%3a%2f%2f10.0.1.100%2fiTunes%2fiTunes%2fiTunes%2520Media%2fmusic%2fThe%2520Beatles%2fA%2520Hard%2520Day's%2520Night%2f01%2520A%2520Hard%2520Day's%2520Night.m4a&amp;v=393"></div>.

Still, though, I can cut and paste this link into my browser and it downloads the correct art. Looking at an entry that correctly shows the art, I see this:

<div class=" image lazythumbnail" data-src="http://xx.xx.xx.xx:1400/getaa?u=x-file-cifs%3a%2f%2f10.0.1.100%2fiTunes%2fiTunes%2fiTunes%2520Media%2fmusic%2fThe%2520Beach%2520Boys%2f20%2520Good%2520Vibrations%2520The%2520Greatest%2520Hits%2f08%2520Shut%2520Down.m4a&amp;v=393" style="background-image: url(&quot;http://xx.xx.xx.xx:1400/getaa?u=x-file-cifs%3a%2f%2f10.0.1.100%2fiTunes%2fiTunes%2fiTunes%2520Media%2fmusic%2fThe%2520Beach%2520Boys%2f20%2520Good%2520Vibrations%2520The%2520Greatest%2520Hits%2f08%2520Shut%2520Down.m4a&amp;v=393&quot;);"></div>

So, it appears that some of the entries are missing the necessary style for the background-image. On further inspection, this seems to occur when the first URL has a “special” character in it, such as parentheses or an apostrophe. Since the URL includes both the folder and file names, either can trigger this behavior.

Any one else seeing this?

Does the album art display properly when using the native Sonos app?

Yes, it does.

I face the same problem. I setup a Symfonisk-Speaker with the sonos App. All media is tagged with musicbrainz and the cover-art is included in the metadata of the file.
I can start the music from the sonos-App and from the HA-Sonos-Integration. But while there are cover arts for allmost every artist and album in the sonos app, there are non in the HA-Sonos-Integration.

As I am not familiar with the underlying technology I also can not share the html-code of the cover art.

One thing probably can help … The sonos-App does not show the cover art included in the metadata.

dis: I believe you have a different problem. I see cover art for some of the albums, but not all. If you are seeing no cover art ad all, I believe that is a different issue.

@RWR629 I noticed the same behavior as well. For me it had to do with using spaces in the album title within the media file. So if you change the album name from “Moon Safari” to “Moon_Safari”. Art work starts showing. Let me know if this is the same for you then we should register this as a bug/issue.

I am in a process of checking and adding artwork to my own mp3 collection and I have used mainly 2 tools for this.

MediaMonkey (I prefer version 4 over version 5) https://www.mediamonkey.com/
MP3 Diags https://mp3diags.sourceforge.net/

MediaMonkey can easily show and administer the artwork in a MP3 file, which can show if no or multiple artwork is marked cover and other easily seen discrepancies, but it could not catch deeper errors with the artwork in my files and it took a long time to find the right program.

MP3 Diags is that program.
MP3 Diags will show you if there are discrepancies with your MP3 tags, like missing ID3V2 tag for artwork, which is the one holding the image in the MP3 version2 tags. The image might still be found in the ID3V1 tags, but some program only look for it in the ID3V2 tags, if the file is in that format.

You need to use these tools to find out where the problem lies and then either fix it yourself or make a bug report/feature request with details of your findings.

PS: Until you have learnt to use the programs do the work on a backup. Especially removing or altering tags in MP3 Diags can actually make you delete the song, so only the MP3 tags are left. :slight_smile:

Reviving this topic after 1 year.

I recently started playing with Sonos and HA and I see EXACTLY same issue, plus some more:

  • if the Album name has a space (composed of 2 words), “best music”, it does not show cover art AND I also have issues letting music start. If the name is with only 1 word “music” or “best” it shows correctly. If there is a _ sign “best_music” it also works. I would however not like to rename ALL my music library for this nonsense.
  • I also have issues in showing favorites from my local media library (not favorites in spotify or Sonos services). This is regardless of title with 1 or more words

Any other with same issue, and willingness to report this as bug/issue ?
thanks a lot!

I’m the original poster and can confirm that the problem still exists. I suspect that somewhere, deep in the code, there is a string that should be quoted and is not, which seems like it should be a simple fix. Anyone know how we can get a developer to look at this?

Have you check the state of your tags in your files?