spotifyd icon indicating copy to clipboard operation
spotifyd copied to clipboard

Being able to download local files from other Devices

Open jWXZSCsqrpZRSVwauBjn opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. Support for syncing local files from other devices as explained in the Spotify Developer docs.

jWXZSCsqrpZRSVwauBjn avatar Apr 16 '24 18:04 jWXZSCsqrpZRSVwauBjn

These docs only explain, how the tracks metadata appears in API requests. AFAIK, there's no possibility to retrieve them from the device that added it.

eladyn avatar Apr 19 '24 11:04 eladyn

it is. You add it to a playlist and make it offline available on another device. If they are in the same network, they sync local songs

jWXZSCsqrpZRSVwauBjn avatar Apr 22 '24 06:04 jWXZSCsqrpZRSVwauBjn

Oh, now it also works for me. (reference) I dug around a bit, but could not find any previous work to reverse engineer that protocol. And while I assume that I figured out, which TCP/UDP messages are related to syncing, I wasn't able to see how they're doing it.

Things I found out:
- When hitting the download button on the phone, it sends a UDP request to everyone on the network (port: 57621) containing `SpotUdp0` and other things. - The desktop app responds with a similar message specifically to the requesting device (port: 57621) at least containing the number `57621` and other things. - Then the real communication begins over TCP, where the files seem to be transmitted.

So not a lot I figured out, unfortunately.

So if anyone else is interested in reversing this protocol, this might be interesting, but for now, this is probably out of scope. (Considering that this isn't even implemented on official connect devices.)

eladyn avatar Apr 22 '24 16:04 eladyn