5 ms·
It is not hard. But please don't misuse it and ruin the fun for everyone. It is nice to be able to use the music relatively easily for hobby projects. My music
by derkades 9mo ago
It is not hard. But please don't misuse it and ruin the fun for everyone. It is nice to be able to use the music relatively easily for hobby projects. My music server has functionality to play tracks from Spotify this way:
https://codeberg.org/raphson/music-server/src/branch/main/spotify-sync https://codeberg.org/raphson/music-server/src/branch/main/sp...
- KomoD 9mo agoWhere the magic actually happens: https://github.com/librespot-org/librespot https://github.com/librespot-org/librespot
- reassess_blind 9mo agoI wonder how many premium accounts Anna’s Archive had to use to scrape the whole thing. Surely Spotify has scrape protection and wouldn’t allow a single account to stream (download) millions of separate tracks.
- grishka 9mo agoI haven't looked at the code but I would be surprised if the premium account "requirement" is anything more than an if statement that can be commented out.
- squigz 9mo agoPretty sure that requirement is server-side?
- grishka 9mo agoWhat do you mean? You can still stream any song with a free account. It's just that there will be ads. Additionally, in mobile apps, there will be ridiculous artificial limitations to make sure your experience is as miserable as it could possibly be. My understanding is that the premium requirement is there to avoid having the repo taken down.
- squigz 9mo agoMy understanding, based on a related comment in this thread, was that premium accounts get higher quality; in that case, I figured any such checks would be server-side. If you were referring to a separate check in the above repo's code, my mistake.
- grishka 9mo agoHm, maybe. I don't remember whether they offer higher quality. If they do, it would make sense to have that check on the server side. It's been a while since I last used Spotify because they deleted my account in 2022 without warning when they left Russia. But I was referring specifically to all third-party reverse-engineered Spotify players requiring premium accounts to function at all.
- Retr0id 9mo agoYou are correct
- nsteel 9mo agoI believe that changed recently and Spotify started blocking the key requests from free accounts.
- Retr0id 9mo agoThen how do people with free accounts listen to music lol (It is plausible they added some new DRM but it's not going to be anything too crazy)
- nsteel 9mo agoTheir official clients have moved over to playplay DRM protection for non-lossless files too. The old key endpoints no longer work for free accounts, they must have added a server-side check.
- KomoD 9mo agoI have a feeling they didn't use premium accounts since they downloaded at 160kbit/s, which is the highest quality that free accounts can get. Premium gets 320kbit/s (or lossless)
- tayiorrobinson 9mo agoto use this method of scraping, logging in with a premium account is required. so either they found a way around that lock, but not the quality lock, or they just decided 160k is good enough (it generally is), and decided to stick with that for filesize & bandwidth savings
- oarfish 9mo agoSeems like librespot is not directly suppporting the fetching of audio to files, and intentionally so, in order to not get targeted by Spotify. Obviously you can dump the audio to file as it "plays", but that would be be very slow. So I suppose if one wanted to use librespot for archiving, one would have to modify it to support this use case.