This is a fork of https://github.com/librespot-org/librespot-golang with some minor fixes and changes.
librespot-golang is an opensource Golang library based on the librespot project, allowing you to control Spotify Connect devices, get metadata, and play music. It has itself been based on SpotControl, and its main goal is to provide a suitable replacement for the defunct libspotify.
This is still highly experimental and in development. Do not use it in production projects yet, as the API is incomplete and subject to heavy changes.
This fork contains changes that are more compatible with go.mod, while removing the Rust-esque package layout. It has not been tested thoroughly, though things do compile. Please open an issue if anything is broken.
This package can be installed using:
go get github.com/irgendwr/librespot-golang/librespot
To use the package look at the example micro-controller (for Spotify Connect). For the CLI, install the main package:
go get -u github.com/irgendwr/librespot-golang
Building for mobile
librespotmobile contains bindings suitable for use with Gomobile, which lets you use a subset of the librespot library on Android and iOS.
To get started, install gomobile, and simply run (for Android):
cd $GOPATH/src/github.com/irgendwr/librespot-golang gomobile init -ndk /path/to/android-ndk gomobile bind librespotmobile
This will build you a file called
librespotmobile.aar which you can include in your Android Studio project.
Compiling on nix:
nix-shell -p gcc pkgconfig libvorbis libogg portaudio
- Handling disconnections, timeouts, etc (overall failure tolerance)
- Playlist management
- Spotify Radio support
- Spotify Connect support (librespot-org/librespot-golang#22)
There is no documentation for this package.
Package Spotify is a generated protocol buffer package.
|Package Spotify is a generated protocol buffer package.|
Package librespotmobile contains simplified bindings to use the library with Gomobile, in order to build for Android and iOS.
|Package librespotmobile contains simplified bindings to use the library with Gomobile, in order to build for Android and iOS.|