Congrats to Mogery for releasing this!
Yeah, Rust and the Switch don't mesh together very well, at least for now. I was tempted to take that route also, but I ended up reimplementing librespot in C instead, which serves as the backend for this.
Yep, the aarch64-nintendo-switch-freestanding target will (very likely) be available in Rust 1.64.0 [0].
[0]: https://github.com/rust-lang/rust/pull/88991#issuecomment-11...
How did was this person able to play the encrypted audio? Does this not let them effectively rip music from Spotify?
If you're savvy enough to watch the network tab in the browser devtools, you can grab the key and easily decrypt and assemble the chunks. You can even find reference implementations on github (hls.js for instance).
Certainly there's no need for "special hardware decoders" – Spotify works on loads of devices that have no support for that kind of thing.
"The good old days"
[1] Trace of this, from 2013: https://stackoverflow.com/questions/20614360/does-the-libspo...
Can you play Spotify on your PC or phone?
(one "interesting" case around that was that some OnePlus phones couldn't play netflix in resolutions higher than 480p, because despite the Snapdragon chip supporting the DRM format required for higher resolutions, OnePlus never paid the licence to use it - so their phones couldn't decrypt the video. They did relent later and said they will enable the functionality for users who send in their phones, and it can only be flashed in person at their service centre, not via an OTA update. I always wondered how many people have done that)
Most of my issues stemmed from a lack of proper documentation.
One time I screwed up the packet format and was pulling my hair out when the only response I got was "Invalid username/password" from the Spotify API (or something along those lines. been a while).
The other times were more related to the Switch. Figuring out how networking and audio works, mostly. Hunting through the shit documentation and the source code of libnx to find out what I need to do. My audio implementation was either not playing anything or crashing for a long time in the beginning. I still have no clue what I did to solve it, which is unfortunate.
I think you can just see what Spot [0] does instead!
Strawberry player is supposed to support Tidal, but I can't seem to pull the ClientID/ClientSecret key from the official client (I guess they closed that loophole).
It opened a whole bevvy of open and useful Spotify clients that worked amazingly and some that still do to this day. Mopidy, as well as a handful of amazing MPD-speaking daemons got me through college. The only conceit was that it required a premium account and yielding a third party client your authentication data. They had some issues with Facebook authentication as it was OIDC, but setting a user name and password on your account was a simple solution.
The Spotify team has killed libspotify in preference for a Javascript browser or Mobile Device library (ios/ObjC or Android /kotlin) that uses the browser to authenticate over openID. It can only be a connect target, not query the full api, and depends heavily on the browser or native api to play the media.
I assume it's inevitable, with the fervour of people in the switch homebrew scene.