[PR #8] [MERGED] Implement Spotify search APIs integration Part I #572

Closed
opened 2026-03-02 23:48:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

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

Base: masterHead: spotify-search-apis-integration


📝 Commits (10+)

  • eba0a71 move construct_list_widget to ui/mod.rs
  • 77fcbad add state structs for integrating search APIs
  • a205186 use construct_list_widget to constructs list widgets for artist context window
  • 8790fb5 implement client's search function
  • 0cfa752 handle search enum variant for WindowState
  • cbca5d1 improve documentation for UI rendering functions
  • 35f7ced refactor ui/help.rs
  • dc6a9af implement render_search_window
  • cc29087 reduce code duplication in rendering main layout codes
  • a706e71 include device as playback metadata when rendering playback window

📊 Changes

13 files changed (+927 additions, -291 deletions)

View changed files

📝 README.md (+1 -1)
📝 spotify_player/src/client.rs (+158 -5)
📝 spotify_player/src/command.rs (+3 -0)
📝 spotify_player/src/config/keymap.rs (+8 -0)
📝 spotify_player/src/event.rs (+247 -54)
📝 spotify_player/src/state/player.rs (+38 -0)
📝 spotify_player/src/state/ui.rs (+58 -10)
📝 spotify_player/src/ui/context.rs (+61 -54)
📝 spotify_player/src/ui/help.rs (+62 -23)
📝 spotify_player/src/ui/mod.rs (+75 -49)
📝 spotify_player/src/ui/popup.rs (+61 -92)
spotify_player/src/ui/search.rs (+152 -0)
📝 spotify_player/src/utils.rs (+3 -3)

📄 Description

Brief description of changes

  • added SearchResults representing returned data when searching
  • added ui/search.rs including handling logics for rendering the search page
  • implemented client's search function
  • separated handling logics for search window's commands and context window's commands
  • added command handler functions for sub windows (track, album, artist, playlist lists) of the search page
  • added EnterSearchPage command for entering the search page
  • other code refactors

🔄 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/8 **Author:** [@aome510](https://github.com/aome510) **Created:** 9/12/2021 **Status:** ✅ Merged **Merged:** 9/24/2021 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `spotify-search-apis-integration` --- ### 📝 Commits (10+) - [`eba0a71`](https://github.com/aome510/spotify-player/commit/eba0a71cc8c74ac542020a4e9ff866eca2ac6c9a) move `construct_list_widget` to `ui/mod.rs` - [`77fcbad`](https://github.com/aome510/spotify-player/commit/77fcbad7608d28d235991ea0c7fb4fd16fcd7a7e) add state structs for integrating search APIs - [`a205186`](https://github.com/aome510/spotify-player/commit/a205186cf36cf7508548b90e54a88d1f9d1f0ea0) use `construct_list_widget` to constructs list widgets for artist context window - [`8790fb5`](https://github.com/aome510/spotify-player/commit/8790fb5cce1c7ecfe40510e6f351c9e9c0f2559d) implement client's `search` function - [`0cfa752`](https://github.com/aome510/spotify-player/commit/0cfa752c697b3b5f42556f331fc8e2e9c190e9eb) handle search enum variant for WindowState - [`cbca5d1`](https://github.com/aome510/spotify-player/commit/cbca5d19c444522e519ad4274b20a91f6c887d18) improve documentation for UI rendering functions - [`35f7ced`](https://github.com/aome510/spotify-player/commit/35f7ced6b416bef10bbc16a1c5e7fcd69c26d5e5) refactor `ui/help.rs` - [`dc6a9af`](https://github.com/aome510/spotify-player/commit/dc6a9afc9aa6fc338d1b31919acf17eea974c23e) implement `render_search_window` - [`cc29087`](https://github.com/aome510/spotify-player/commit/cc29087000219e2b8c85a3992801cbf468861d25) reduce code duplication in rendering main layout codes - [`a706e71`](https://github.com/aome510/spotify-player/commit/a706e71ed8c53efdb3da116282583e3157f9ea2b) include `device` as playback metadata when rendering playback window ### 📊 Changes **13 files changed** (+927 additions, -291 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `spotify_player/src/client.rs` (+158 -5) 📝 `spotify_player/src/command.rs` (+3 -0) 📝 `spotify_player/src/config/keymap.rs` (+8 -0) 📝 `spotify_player/src/event.rs` (+247 -54) 📝 `spotify_player/src/state/player.rs` (+38 -0) 📝 `spotify_player/src/state/ui.rs` (+58 -10) 📝 `spotify_player/src/ui/context.rs` (+61 -54) 📝 `spotify_player/src/ui/help.rs` (+62 -23) 📝 `spotify_player/src/ui/mod.rs` (+75 -49) 📝 `spotify_player/src/ui/popup.rs` (+61 -92) ➕ `spotify_player/src/ui/search.rs` (+152 -0) 📝 `spotify_player/src/utils.rs` (+3 -3) </details> ### 📄 Description # Brief description of changes - added `SearchResults` representing returned data when searching - added `ui/search.rs` including handling logics for rendering the search page - implemented client's `search` function - separated handling logics for search window's commands and context window's commands - added command handler functions for sub windows (track, album, artist, playlist lists) of the search page - added `EnterSearchPage` command for entering the search page - other code refactors --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:48:52 +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#572
No description provided.