Skip to main content
Avid Contributor I
September 2, 2024

Shuffle Apple Music Library

  • September 2, 2024
  • 18 replies
  • 1717 views

PLEASE add an option to Shuffle the Songs in Apple Music Library. This exists for Spotify, it exists for our local music library, it should be able to exist for Apple Music.

 

Here are the “workarounds” and why they are bad:

  • “Just shuffle play in the Apple Music app and airplay to your sonos!” - Then we miss out on Lossless quality, which is reduced over airplay. Plus it’s much better to keep things within the Sonos ecosystem and limit the number of different apps we need to do simple things.
  • “Just start playing any song in your library, and then enable shuffle” - This does not work. The queue will be empty.
  • “Just use the My Station feature in Apple Music” - this is not the same as shuffling an entire library. It’s just some playlist that an algorithm creates, so you can hear familiar songs over and over.
This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.
Pinned Reply By Corry P

Hi @mowgli-san 

Thanks again for flagging this behaviour. We’ve created a ticket for it, but please be aware this issue is on Apple to resolve - we will let them know, but it may have more sway coming from a paying customer like yourself.

I’ve removed the feature request tag from the thread as @controlav is correct.

18 replies

controlav
Lead Maestro
September 12, 2024

Hi @mowgli-san 

Thanks again for flagging this behaviour. We’ve created a ticket for it, but please be aware this issue is on Apple to resolve - we will let them know, but it may have more sway coming from a paying customer like yourself.

I’ve removed the feature request tag from the thread as @controlav is correct.

 

Why is it on Apple to fix? It works in the Desktop app, and it works in my app. Apple are tagging the collection in the correct manner, but the new app doesn’t handle the tags correctly for some reason.

Author of the leading independent Sonos apps for Android, MacOS, iOS, Windows and Xbox.
Avid Contributor I
September 12, 2024

@Corry P I’m also confused why it would be on Apple to fix this. In Apple Music apps (whether iOS, or Mac OS desktop), you can of course Shuffle all the Songs in the library section. (You can also go to an Artist page, and click “Play” to shuffle songs by them). It is within the SONOS app that all of these features are missing.

 

As for what @controlav mentioned about it working in the sonos desktop app - this doesn’t even work for me there. The shuffle button exists there, but when I click it, I get “Please wait” and spinning for a 10+ seconds, and then “An error occurred while adding to the queue. (1002)”.

So, broken all around.

Corry P
Sonos Staff
September 12, 2024

Hi @controlav & @mowgli-san 

Why is it on Apple to fix? It works in the Desktop app, and it works in my app. Apple are tagging the collection in the correct manner, but the new app doesn’t handle the tags correctly for some reason.

@Corry P I’m also confused why it would be on Apple to fix this. In Apple Music apps (whether iOS, or Mac OS desktop), you can of course Shuffle all the Songs in the library section. (You can also go to an Artist page, and click “Play” to shuffle songs by them). It is within the SONOS app that all of these features are missing.

It’s on them to fix because they are responsible for maintaining their integration into our API - it’s how we’re able to support 100’s of services. You’ll notice that the landing pages for different services in the Sonos app look different from each other? That’s because different services set them up differently. They are requested to keep things fairly similar, of course, to preserve an amount of consistency for app UI usage.

As for what @controlav mentioned about it working in the sonos desktop app - this doesn’t even work for me there. The shuffle button exists there, but when I click it, I get “Please wait” and spinning for a 10+ seconds, and then “An error occurred while adding to the queue. (1002)”.

So, broken all around.

That sounds like a separate issue. Please try removing Apple Music from your Sonos system, then add it again.

Remove a music service account from Sonos

Add a music service to Sonos

It may also help to reboot your router too - please switch it off for at least 30 seconds.

Are you sure it said error 1002? That usually refers to a lost connection to a Music Library source, not to a music service.

I hope this helps.

 

"Common sense is the collection of prejudices acquired by age eighteen." - Albert Einstein
controlav
Lead Maestro
September 12, 2024

Hi @controlav & @mowgli-san 

Why is it on Apple to fix? It works in the Desktop app, and it works in my app. Apple are tagging the collection in the correct manner, but the new app doesn’t handle the tags correctly for some reason.

It’s on them to fix because they are responsible for maintaining their integration into our API - it’s how we’re able to support 100’s of services. You’ll notice that the landing pages for different services in the Sonos app look different from each other? That’s because different services set them up differently. They are requested to keep things fairly similar, of course, to preserve an amount of consistency for app UI usage.

Here is the XML segment that Apple return for the “songs” container:

canPlay is clearly set to true. Which is why the Desktop app (and my app) shows the Play and Shuffle buttons at the top of the list.

Author of the leading independent Sonos apps for Android, MacOS, iOS, Windows and Xbox.
Corry P
Sonos Staff
September 13, 2024

Hi @controlav 

I’m told they are using the wrong container type. That’s about all I know about it.

"Common sense is the collection of prejudices acquired by age eighteen." - Albert Einstein
controlav
Lead Maestro
September 13, 2024

Interesting, for Amazon / Artist / Top Songs, all apps show play/shuffle, and its XML is this:

The Amazon XML has canEnumerate as true, which is missing from Apple’s response. However, the SAMPI spec says it defaults to true anyway, so my speculation as to the cause is this:

The new app treats a missing canEnumerate as false, but it should treat it as true.

I don’t see anything wrong with the container type that might affect this.

 

Author of the leading independent Sonos apps for Android, MacOS, iOS, Windows and Xbox.
Corry P
Sonos Staff
September 13, 2024

Hi @controlav 

Services were required to rewrite their integrations - I know this because at least one did not have the resources to do so and is now no longer available. Are you sure, therefore, that you are even looking at the right xml file? The new app may be requesting a different xml file - this is speculation on my part and I don’t actually know one way or the other.

"Common sense is the collection of prejudices acquired by age eighteen." - Albert Einstein
controlav
Lead Maestro
September 13, 2024

Hi @controlav 

Services were required to rewrite their integrations - I know this because at least one did not have the resources to do so and is now no longer available. Are you sure, therefore, that you are even looking at the right xml file? The new app may be requesting a different xml file - this is speculation on my part and I don’t actually know one way or the other.

Oh interesting, I was not aware of that Corry. I knew that the mobile app no longer calls the services directly but uses the Sonos cloud service as a proxy (which is one reason it’s a lot slower), so obviously I can’t see the SMAPI XML on the other side. However I can look at the traffic that the cloud proxy returns to the app, and that is my next step. Sounds like a fun weekend project. Thanks.

Author of the leading independent Sonos apps for Android, MacOS, iOS, Windows and Xbox.