-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local media playback #208
Comments
Right now there is no way to reproduce local tracks because I never thought that would be useful. Could you describe your usa case/scenario? Just to understand how it could work. |
I've set up librespot-java to run as a service on a headless raspberry pi. The audio is then routed through darkice to a local icecast server that works as a mini radio station for other devices in the house. The actual files can reside on a network share or locally on the pi. |
I never thought of using a network share, but it could work this way. The problem before was that the client only communicates (I think) the name of the file which would make pretty unpractical synchronizing tracks between two devices without additional software. I don't think there's any way to create a "custom" local track, so the user has to add the mounted network share to the local files on the desktop client and then setup librespot to search the local tracks on said network share. Not too bad. |
Yes, I suppose in my case the network share should be served by the pi itself but in theory any network share will work? FYI I've created a simple nodejs script that runs as a service and hooks on the librespot-java api. Its role is to update the icecast metadata whenever it receives the |
With Java there is no need to cross-compile. Just run |
Oh that's nice, cheers |
I just wanted to add something I only just recently discovered: the ability for mobile spotify clients to "download" playlists with local files created on a desktop client. Maybe of use to you https://support.spotify.com/us/using_spotify/features/listen-to-local-files/ |
This does seem very useful, similar to how the android works. I load files on my desktop, create a playlist, then click download on a the playlist on my phone, now I can listen to those tracks on my phone through Spotify. Would be useful to have some sort of mechanism to tell this app to do this with some playlists. |
I have not forgotten about this! I am in the process of implementing local files playback. |
How will we get to decide which playlists or songs to download to the device? |
For the moment you'll have to point librespot-java to where you have your local files and it'll take them from there. Following the shared drive idea. Having the download functionality would require to reverse engineer the transfer protocol, so that's enough for a start. |
Turns out this is harder than what I thought, the Spotify client doesn't communicate to librespot-java where the file really is, but just some metadata (name, artist, album, duration). Reversing the transfer protocol might be needed to understand where the files are. |
First of all thanks for keep looking at this, great news!
Hope that helps |
Mhh, I wonder if the client indexes the folder and matches the files based on the metadata (that's not optimal because there's nothing preventing two tracks from having the exact same metadata). But I cannot see any identifier being transmitted with the tracks. It makes sense for it not to have the full path to file because of security reasons, but at least the filename. Or maybe I am missing some feature flag in the client configuration. UPDATE The Spotify Desktop app logs aren't very useful, all that is reported is |
I can definitely do some tests and see if the match is based on metadata and/or filename. Will keep you posted |
Is there a way for librespot-jave to playback local content the same way Spotify desktop does?
If yes, can you please provide a link or some instructions on how to configure it?
Many thanks
The text was updated successfully, but these errors were encountered: