Live data from Hacker News

Unofficial Spotify Client for the Nintendo Switch (PoC)

gbatemp.net

11–20 of 42 posts

Re: Unofficial Spotify Client for the Nintendo Switch (PoC)

#11
I tried to create a spotify client for the nintendo switch as my very first rust project. I initially wanted to use librespot as a backend. I gave up pretty quickly, things just went over my head and got too complex.

Congrats to Mogery for releasing this!

Re: Unofficial Spotify Client for the Nintendo Switch (PoC)

#13

Is this on a rooted Switch? Do you need any special HW revision to be able to install extra software like this? Will games still sork?

Yes, mostly yes, and yes. Early hardware revisions are easily hackable while later ones require a fairly expensive modchip. Games will run stock but depending on what software you load in Nintendo can detect modifications and ban you from online services if you're not careful.

Re: Unofficial Spotify Client for the Nintendo Switch (PoC)

#14
post #9
post #4

I was under the impression that all audio Spotify serves is heavily DRM-ed and can only play with special hardware decoders which respect the DRM? How did was this person able to play the encrypted audio? Does this not let them effectively rip music from Spotify?

Spotify DRM is basically security through obscurity. It's just AES-128-CTR over a plain old OGG file. The tricky part is figuring out the extremely odd protocol you have to request audio keys and track data through. That's all.

Sounds similar to many encrypted HLS streams you see on the internet.

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).

Re: Unofficial Spotify Client for the Nintendo Switch (PoC)

#15
post #4

I was under the impression that all audio Spotify serves is heavily DRM-ed and can only play with special hardware decoders which respect the DRM? How did was this person able to play the encrypted audio? Does this not let them effectively rip music from Spotify?

It's not, really – AFAIK the audio is just AES-encypted with a per-session key that you get when logging in (but it's been a long time since I looked). There are a bunch of open implementations, like https://github.com/librespot-org/librespot – I guess it's kind of an open secret that you could rip music if you really wanted to, and you certainly used to be able to do that with libspotify when it was still around. I…

Does Spotify watermark their streams?

Re: Unofficial Spotify Client for the Nintendo Switch (PoC)

#16

I tried to create a spotify client for the nintendo switch as my very first rust project. I initially wanted to use librespot as a backend. I gave up pretty quickly, things just went over my head and got too complex. Congrats to Mogery for releasing this!

Thanks!

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.

Re: Unofficial Spotify Client for the Nintendo Switch (PoC)

#17
post #4

I was under the impression that all audio Spotify serves is heavily DRM-ed and can only play with special hardware decoders which respect the DRM? How did was this person able to play the encrypted audio? Does this not let them effectively rip music from Spotify?

You can download L3 CDM from GitHub, or even dump your own using wvdumper/dumper. Then its just a matter of making a request to Spotify License server, which returns key for decrypting.

Re: Unofficial Spotify Client for the Nintendo Switch (PoC)

#18
post #16

I tried to create a spotify client for the nintendo switch as my very first rust project. I initially wanted to use librespot as a backend. I gave up pretty quickly, things just went over my head and got too complex. Congrats to Mogery for releasing this!

Thanks! 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.

> at least for now

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...

Re: Unofficial Spotify Client for the Nintendo Switch (PoC)

#19
post #4

I was under the impression that all audio Spotify serves is heavily DRM-ed and can only play with special hardware decoders which respect the DRM? How did was this person able to play the encrypted audio? Does this not let them effectively rip music from Spotify?

The DRM has been broken for years, and is still broken (I personally wrote a Rust client to grab music from Spotify in .ogg format) but their lawyers rabidly take down any reference to decrypting it on Github or anywhere else, because well, the implication.

A funny IASIP reference, you love to see it
Post reply on HN