[PR #2] [MERGED] Librespot integration Part I: use librespot for authentication #1502

Closed
opened 2026-03-14 15:17:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/2
Author: @aome510
Created: 8/22/2021
Status: Merged
Merged: 8/22/2021
Merged by: @aome510

Base: masterHead: librespot-integration


📝 Commits (10+)

  • d2438f7 not panic the client thread when failing to refresh the auth token
  • d291d45 try blocking rspotify
  • 5b14600 add about section
  • 4b47eae add librespot libraries
  • 0519eb9 use librespot to get auth token and construct the application's client
  • ee1a07c Merge branch 'use-blocking-rspotify' into librespot-integration
  • a07eb86 update application's client codes post switching to rspotify blocking client
  • 4f16e0b refresh token upon expiring
  • 57dd26d add cache folder option, clean application init codes
  • 360cded use librespot cached credentials

📊 Changes

18 files changed (+1122 additions, -531 deletions)

View changed files

📝 Cargo.lock (+729 -157)
📝 README.md (+1 -31)
examples/callback.png (+0 -0)
examples/callback_docker.png (+0 -0)
📝 spotify_player/Cargo.toml (+7 -3)
spotify_player/src/auth.rs (+80 -0)
📝 spotify_player/src/client.rs (+123 -190)
📝 spotify_player/src/command.rs (+2 -3)
📝 spotify_player/src/config/keymap.rs (+4 -4)
📝 spotify_player/src/config/mod.rs (+7 -20)
📝 spotify_player/src/event.rs (+24 -24)
📝 spotify_player/src/main.rs (+28 -65)
📝 spotify_player/src/state/mod.rs (+26 -1)
📝 spotify_player/src/state/player.rs (+6 -6)
📝 spotify_player/src/state/ui.rs (+3 -3)
spotify_player/src/token.rs (+58 -0)
📝 spotify_player/src/ui/mod.rs (+1 -1)
📝 spotify_player/src/ui/popup.rs (+23 -23)

📄 Description

Brief description of changes

  • add librespot-core and librespot-playback for Librespot integration
  • use librespot token for authentication and interacting with Spotify Web APIs
  • switch to use rspotify::blocking::client from the async client
  • (temporarily) disable SwitchDevice command and its handlers
  • remove authentication (with Spotify's client_secret and client_id) documentation

🔄 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/aome510/spotify-player/pull/2 **Author:** [@aome510](https://github.com/aome510) **Created:** 8/22/2021 **Status:** ✅ Merged **Merged:** 8/22/2021 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `librespot-integration` --- ### 📝 Commits (10+) - [`d2438f7`](https://github.com/aome510/spotify-player/commit/d2438f739669389b135d88db0c8731857a8426e5) not panic the client thread when failing to refresh the auth token - [`d291d45`](https://github.com/aome510/spotify-player/commit/d291d456a6ab54e316adf9ce40bdd6f2fa529f7a) try blocking rspotify - [`5b14600`](https://github.com/aome510/spotify-player/commit/5b14600c10f4daf33e2cca804adac1246ab92490) add `about` section - [`4b47eae`](https://github.com/aome510/spotify-player/commit/4b47eae86d96af16a08f7c317a1f1865cc7e7de8) add librespot libraries - [`0519eb9`](https://github.com/aome510/spotify-player/commit/0519eb9e9146c50455dd5c25862e119ef766c55d) use `librespot` to get auth token and construct the application's client - [`ee1a07c`](https://github.com/aome510/spotify-player/commit/ee1a07c8f240d13ab6bed28e5d1c7a63b2e2f23a) Merge branch 'use-blocking-rspotify' into librespot-integration - [`a07eb86`](https://github.com/aome510/spotify-player/commit/a07eb8614d6274df8c307b7e8d4d39a589f72147) update application's client codes post switching to rspotify blocking client - [`4f16e0b`](https://github.com/aome510/spotify-player/commit/4f16e0bce2787b1791ed0605acea04e5cb5a87f9) refresh token upon expiring - [`57dd26d`](https://github.com/aome510/spotify-player/commit/57dd26d1f7a1f342340f5019f7bf1b6b2f88f654) add cache folder option, clean application init codes - [`360cded`](https://github.com/aome510/spotify-player/commit/360cded792f3cc200f17e5c7363f9f7e67939a0f) use `librespot` cached credentials ### 📊 Changes **18 files changed** (+1122 additions, -531 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+729 -157) 📝 `README.md` (+1 -31) ➖ `examples/callback.png` (+0 -0) ➖ `examples/callback_docker.png` (+0 -0) 📝 `spotify_player/Cargo.toml` (+7 -3) ➕ `spotify_player/src/auth.rs` (+80 -0) 📝 `spotify_player/src/client.rs` (+123 -190) 📝 `spotify_player/src/command.rs` (+2 -3) 📝 `spotify_player/src/config/keymap.rs` (+4 -4) 📝 `spotify_player/src/config/mod.rs` (+7 -20) 📝 `spotify_player/src/event.rs` (+24 -24) 📝 `spotify_player/src/main.rs` (+28 -65) 📝 `spotify_player/src/state/mod.rs` (+26 -1) 📝 `spotify_player/src/state/player.rs` (+6 -6) 📝 `spotify_player/src/state/ui.rs` (+3 -3) ➕ `spotify_player/src/token.rs` (+58 -0) 📝 `spotify_player/src/ui/mod.rs` (+1 -1) 📝 `spotify_player/src/ui/popup.rs` (+23 -23) </details> ### 📄 Description **Brief description of changes** - add `librespot-core` and `librespot-playback` for Librespot integration - use `librespot` token for authentication and interacting with Spotify Web APIs - switch to use `rspotify::blocking::client` from the async client - (temporarily) disable `SwitchDevice` command and its handlers - remove authentication (with Spotify's `client_secret` and `client_id`) documentation --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 15:17:35 +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/spotify-player#1502
No description provided.