Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: librespot-org/librespot-golang
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: arcspace/go-librespot-old
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 11 commits
  • 80 files changed
  • 1 contributor

Commits on Apr 25, 2023

  1. get working for go 1.18

    Drew O'Meara committed Apr 25, 2023
    Copy the full SHA
    6fae10f View commit details
  2. inserted community revisions

    Drew O'Meara committed Apr 25, 2023
    Copy the full SHA
    0a02c31 View commit details

Commits on Apr 26, 2023

  1. tweaks

    Drew O'Meara committed Apr 26, 2023
    Copy the full SHA
    ccb08d9 View commit details
  2. changed popularity to float

    Drew O'Meara committed Apr 26, 2023
    Copy the full SHA
    68221c9 View commit details

Commits on Apr 27, 2023

  1. WIP

    Drew O'Meara committed Apr 27, 2023
    Copy the full SHA
    e94c2c9 View commit details

Commits on Apr 29, 2023

  1. WIP

    Drew O'Meara committed Apr 29, 2023
    Copy the full SHA
    1a5cc6d View commit details

Commits on May 2, 2023

  1. WIP

    Drew O'Meara committed May 2, 2023
    Copy the full SHA
    b5c0511 View commit details

Commits on May 8, 2023

  1. librespot refactor

    Drew O'Meara committed May 8, 2023
    Copy the full SHA
    efc17fa View commit details
  2. rename edits

    Drew O'Meara committed May 8, 2023
    Copy the full SHA
    c2726e4 View commit details

Commits on May 10, 2023

  1. updated formats

    Drew O'Meara committed May 10, 2023
    Copy the full SHA
    b2c8b7f View commit details
  2. rename edits

    Drew O'Meara committed May 10, 2023
    Copy the full SHA
    64c7f6e View commit details
Showing with 631 additions and 6,483 deletions.
  1. +1 −1 .gitignore
  2. +7 −46 README.md
  3. 0 Spotify/ad-hermes-proxy.pb.go
  4. 0 Spotify/ad-hermes-proxy.proto
  5. 0 Spotify/appstore.pb.go
  6. 0 Spotify/appstore.proto
  7. 0 Spotify/authentication.pb.go
  8. 0 Spotify/authentication.proto
  9. 0 Spotify/facebook-publish.pb.go
  10. 0 Spotify/facebook-publish.proto
  11. 0 Spotify/keyexchange.pb.go
  12. 0 Spotify/keyexchange.proto
  13. 0 Spotify/mercury.pb.go
  14. 0 Spotify/mercury.proto
  15. 0 Spotify/mergedprofile.pb.go
  16. 0 Spotify/mergedprofile.proto
  17. +471 −1,601 Spotify/metadata.pb.go
  18. +25 −119 Spotify/metadata.proto
  19. 0 Spotify/playlist4changes.pb.go
  20. 0 Spotify/playlist4changes.proto
  21. 0 Spotify/playlist4content.pb.go
  22. 0 Spotify/playlist4content.proto
  23. 0 Spotify/playlist4issues.pb.go
  24. 0 Spotify/playlist4issues.proto
  25. 0 Spotify/playlist4meta.pb.go
  26. 0 Spotify/playlist4meta.proto
  27. 0 Spotify/playlist4ops.pb.go
  28. 0 Spotify/playlist4ops.proto
  29. 0 Spotify/popcount.pb.go
  30. 0 Spotify/popcount.proto
  31. 0 Spotify/pubsub.pb.go
  32. 0 Spotify/pubsub.proto
  33. 0 Spotify/radio.pb.go
  34. 0 Spotify/radio.proto
  35. 0 Spotify/search.pb.go
  36. 0 Spotify/search.proto
  37. 0 Spotify/social.pb.go
  38. 0 Spotify/social.proto
  39. 0 Spotify/spirc.pb.go
  40. 0 Spotify/spirc.proto
  41. 0 Spotify/toplist.pb.go
  42. 0 Spotify/toplist.proto
  43. +23 −11 go.mod
  44. +36 −26 go.sum
  45. +0 −57 librespot/connection/connection.go
  46. +0 −33 librespot/connection/packettypes.go
  47. +0 −6 librespot/connection/stream.go
  48. +0 −205 librespot/core/login.go
  49. +0 −80 librespot/core/oauth.go
  50. +0 −357 librespot/core/session.go
  51. +0 −208 librespot/core/session_test.go
  52. +0 −145 librespot/crypto/keys.go
  53. +0 −530 librespot/crypto/shan.go
  54. +0 −157 librespot/crypto/shannon.go
  55. +0 −332 librespot/discovery/discovery.go
  56. +0 −148 librespot/mercury/api.go
  57. +0 −361 librespot/mercury/mercury.go
  58. +0 −81 librespot/mercury/mercury_test.go
  59. +0 −160 librespot/metadata/metadata.go
  60. +0 −11 librespot/metadata/metadata_test.go
  61. +0 −370 librespot/player/audiofile.go
  62. +0 −84 librespot/player/channel.go
  63. +0 −61 librespot/player/decrypt.go
  64. +0 −29 librespot/player/decrypt_test.go
  65. +0 −33 librespot/player/packets.go
  66. +0 −127 librespot/player/player.go
  67. +0 −252 librespot/spirc/controller.go
  68. +0 −89 librespot/spirc/controller_test.go
  69. +0 −39 librespot/spotify.go
  70. +0 −42 librespot/utils/apresolve.go
  71. +0 −58 librespot/utils/base62.go
  72. +0 −16 librespot/utils/base62_test.go
  73. +0 −237 librespot/utils/blob.go
  74. +0 −12 librespot/utils/device.go
  75. +0 −28 librespotmobile/audiofile.go
  76. +0 −76 librespotmobile/mercury.go
  77. +0 −34 librespotmobile/player.go
  78. +0 −64 librespotmobile/session.go
  79. +0 −2 librespotmobile/spotify.go
  80. +68 −155 main.go
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
librespot-golang

**.DS_Store
vendor/
.idea/
53 changes: 7 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,12 @@
## librespot-golang
## go-librespot

### Introduction

librespot-golang is an opensource Golang library based on the [librespot](https://github.com/plietar/librespot) project, allowing you to control Spotify Connect devices, get metadata, and play music. It has itself been based on [SpotControl](https://github.com/badfortrains/spotcontrol), and its main goal is to provide a suitable replacement wfor the defunct libspotify.
This Go package is an adaption of [librespot-golang](https://github.com/librespot-org/librespot-golang), which itself is an adaption of a [librespot for Rust](https://github.com/librespot-org/librespot) and [librespot-java](https://github.com/librespot-org/librespot-java).

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.
Why this fork?
- Offer _librespot_ for Go while departing from the constraints of its predecessor.
- Refactor its predecessor into proper interfaces that leverage the awesomeness of Go.
- Focus on core functionality and drop peripheral functionality (e.g. audio conversion, remote control). For multiple reasons, such non-core functionality should be in a consuming repo, not the core repo.

### Installation

This package can be installed using:

```sh
go get github.com/librespot-org/librespot-golang/librespot
```

### Usage

To use the package look at the example micro-controller (for Spotify Connect). For the CLI, install the main package:

```sh
go get -u github.com/librespot-org/librespot-golang
```

### Building for mobile

The package `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):

```sh
cd $GOPATH/src/github.com/librespot-org/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:

```sh
nix-shell -p gcc pkgconfig libvorbis libogg portaudio
```

### To-Do's

- Handling disconnections, timeouts, etc (overall failure tolerance)
- Playlist management
- Spotify Radio support
I will happily support any efforts to merge the work done here with [librespot-golang](https://github.com/librespot-org/librespot-golang), but it will require the cooperation and support of others who agree with the whys above. Anyone interested, please speak up in a discussion and let's get to work.
Empty file modified Spotify/ad-hermes-proxy.pb.go
100644 → 100755
Empty file.
Empty file modified Spotify/ad-hermes-proxy.proto
100644 → 100755
Empty file.
Empty file modified Spotify/appstore.pb.go
100644 → 100755
Empty file.
Empty file modified Spotify/appstore.proto
100644 → 100755
Empty file.
Empty file modified Spotify/authentication.pb.go
100644 → 100755
Empty file.
Empty file modified Spotify/authentication.proto
100644 → 100755
Empty file.
Empty file modified Spotify/facebook-publish.pb.go
100644 → 100755
Empty file.
Empty file modified Spotify/facebook-publish.proto
100644 → 100755
Empty file.
Empty file modified Spotify/keyexchange.pb.go
100644 → 100755
Empty file.
Empty file modified Spotify/keyexchange.proto
100644 → 100755
Empty file.
Empty file modified Spotify/mercury.pb.go
100644 → 100755
Empty file.
Empty file modified Spotify/mercury.proto
100644 → 100755
Empty file.
Empty file modified Spotify/mergedprofile.pb.go
100644 → 100755
Empty file.
Empty file modified Spotify/mergedprofile.proto
100644 → 100755
Empty file.
Loading