[PR #891] [MERGED] WIP: new Spotify API #1134

Closed
opened 2026-02-27 20:01:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/891
Author: @roderickvd
Created: 11/26/2021
Status: Merged
Merged: 12/29/2021
Merged by: @roderickvd

Base: new-apiHead: new-api-wip


📝 Commits (10+)

📊 Changes

315 files changed (+11635 additions, -4380 deletions)

View changed files

📝 .github/workflows/test.yml (+95 -39)
📝 CHANGELOG.md (+51 -5)
📝 COMPILING.md (+11 -14)
📝 CONTRIBUTING.md (+15 -8)
📝 Cargo.lock (+501 -297)
📝 Cargo.toml (+11 -11)
📝 README.md (+16 -13)
📝 audio/Cargo.toml (+10 -5)
📝 audio/src/decrypt.rs (+8 -5)
📝 audio/src/fetch/mod.rs (+194 -126)
📝 audio/src/fetch/receive.rs (+205 -175)
📝 audio/src/lib.rs (+1 -3)
📝 audio/src/range_set.rs (+9 -7)
📝 connect/Cargo.toml (+7 -6)
📝 connect/src/context.rs (+22 -9)
📝 connect/src/discovery.rs (+6 -5)
📝 connect/src/spirc.rs (+388 -198)
📝 contrib/Dockerfile (+4 -2)
📝 contrib/librespot.service (+4 -4)
📝 contrib/librespot.user.service (+2 -0)

...and 80 more files

📄 Description

This list will grow and be kept up to date as development progresses.

This work has been completed in earlier commits:

  • Update protobufs
  • Implement HTTP client
  • Resolve and cache spclient and dealer access points
  • Implement caching token provider
  • Add web socket handler
  • Improve Mercury code legibility

This PR adds the following:

  • Add HTTPS support
  • Implement spclient
  • Migrate metadata from Mercury to spclient
  • Migrate playlists to playlist4_external proto
  • Migrate file retrieval to HTTPS CDN
  • Publish Connect state on dealer
  • Dispatch dealer events
  • Implement "repeat single"
  • Merge dev in (ongoing; last caught up on December 8)
  • Test, test, test
  • Merge with dev

Optional work

The following work items are somewhat related but optional. They might go in if time allows, or warrant separate PR's later. They don't need to block merging this PR.

  • Support HTTPS proxies
  • Fix retrieval of lyrics
  • Support playlist editing
  • Fix playlist playing state
  • Switch lewton to Symphonia to support MP3 and FLAC
  • Expose additional metadata fields
  • Add gzip/deflate support
  • Add support for private sessions
  • Report played tracks back to Spotify
  • Implement context pagination if still applicable on the dealer
  • Add documentation
  • Implement logout
  • Filter explicit content depending on the client configuration
  • Figure out the autoplay attribute endpoint
  • Autoplay depending on the client configuration
  • Implement more client configuration knobs (perhaps audio quality, gapless, etc.)
  • Implement rate limiting

These things I'm tackling on the go:

  • Purge use of unwrap, expect and return Result
  • Remove assertions or move them to assert_debug
  • Return meaningful error types

Finally there is a slew of issues that are targeted to be fixed under the new API.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/891 **Author:** [@roderickvd](https://github.com/roderickvd) **Created:** 11/26/2021 **Status:** ✅ Merged **Merged:** 12/29/2021 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `new-api` ← **Head:** `new-api-wip` --- ### 📝 Commits (10+) - [`14c1779`](https://github.com/librespot-org/librespot/commit/14c177905608f98eb528fae3a66debc3592c79d3) Adjust arg types of `Credentials::with_blob` - [`bb24778`](https://github.com/librespot-org/librespot/commit/bb2477831ba1299f60bd4ca9957391fc72c62015) Don't explicitly set the number of periods - [`5f99bba`](https://github.com/librespot-org/librespot/commit/5f99bbae18475fe7f1e340f5bed91d5f0aa747d8) Merge pull request #813 from JasonLG1979/alsa_buffer_hot_fix - [`c0115fd`](https://github.com/librespot-org/librespot/commit/c0115fd4e8e34d6f7db2e3104467609cfc184c79) Merge pull request #763 from Johannesd3/credentials-with-blob-args - [`751ccf6`](https://github.com/librespot-org/librespot/commit/751ccf63bb7d3928ffad0b28ec9a65264ccc39a8) Make `convert` and `decoder` public (#814) - [`9ff3398`](https://github.com/librespot-org/librespot/commit/9ff33980d6a74cc264795a1471d0497a249bcba3) Better errors in PulseAudio backend (#801) - [`b519a4a`](https://github.com/librespot-org/librespot/commit/b519a4a47d5ee3ecb5b3d70b702bdb244ada7388) Update crates (#817) - [`68bec41`](https://github.com/librespot-org/librespot/commit/68bec41e08564187e27d8c132b9b7b8274579819) Improve Alsa backend buffer (#811) - [`4c00b19`](https://github.com/librespot-org/librespot/commit/4c00b19c29d1c29a528e332113f20a0ce9cdcb34) Fix Alsa mixer - [`2541f12`](https://github.com/librespot-org/librespot/commit/2541f123bcbb69454de901f48785988df61a7d68) Update documentation ### 📊 Changes **315 files changed** (+11635 additions, -4380 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test.yml` (+95 -39) 📝 `CHANGELOG.md` (+51 -5) 📝 `COMPILING.md` (+11 -14) 📝 `CONTRIBUTING.md` (+15 -8) 📝 `Cargo.lock` (+501 -297) 📝 `Cargo.toml` (+11 -11) 📝 `README.md` (+16 -13) 📝 `audio/Cargo.toml` (+10 -5) 📝 `audio/src/decrypt.rs` (+8 -5) 📝 `audio/src/fetch/mod.rs` (+194 -126) 📝 `audio/src/fetch/receive.rs` (+205 -175) 📝 `audio/src/lib.rs` (+1 -3) 📝 `audio/src/range_set.rs` (+9 -7) 📝 `connect/Cargo.toml` (+7 -6) 📝 `connect/src/context.rs` (+22 -9) 📝 `connect/src/discovery.rs` (+6 -5) 📝 `connect/src/spirc.rs` (+388 -198) 📝 `contrib/Dockerfile` (+4 -2) 📝 `contrib/librespot.service` (+4 -4) 📝 `contrib/librespot.user.service` (+2 -0) _...and 80 more files_ </details> ### 📄 Description This list will grow and be kept up to date as development progresses. This work has been completed in earlier commits: * [x] Update protobufs * [x] Implement HTTP client * [x] Resolve and cache `spclient` and `dealer` access points * [x] Implement caching token provider * [x] Add web socket handler * [x] Improve Mercury code legibility This PR adds the following: * [x] Add HTTPS support * [x] Implement `spclient` * [x] Migrate metadata from Mercury to `spclient` * [x] Migrate playlists to `playlist4_external` proto * [x] Migrate file retrieval to HTTPS CDN * [ ] Publish Connect state on `dealer` * [ ] Dispatch `dealer` events * [ ] Implement "repeat single" * [x] Merge `dev` in (ongoing; last caught up on December 8) * [ ] Test, test, test * [ ] Merge with `dev` Optional work -------------- The following work items are somewhat related but optional. They might go in if time allows, or warrant separate PR's later. They don't need to block merging this PR. * [x] Support HTTPS proxies * [x] Fix retrieval of lyrics * [ ] Support playlist editing * [ ] Fix playlist playing state * [ ] Switch `lewton` to `Symphonia` to support MP3 and FLAC * [x] Expose additional metadata fields * [ ] Add gzip/deflate support * [ ] Add support for private sessions * [ ] Report played tracks back to Spotify * [ ] Implement context pagination if still applicable on the dealer * [ ] Add documentation * [ ] Implement logout * [ ] Filter explicit content depending on the client configuration * [x] Figure out the autoplay attribute endpoint * [ ] Autoplay depending on the client configuration * [ ] Implement more client configuration knobs (perhaps audio quality, gapless, etc.) * [ ] Implement rate limiting These things I'm tackling on the go: * [x] Purge use of `unwrap`, `expect` and return `Result` * [ ] Remove assertions or move them to `assert_debug` * [x] Return meaningful error types Finally there is a slew of issues that are targeted to be fixed under the new API. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:01:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1134
No description provided.