[GH-ISSUE #425] Search from CLI #230

Closed
opened 2026-03-02 23:45:43 +03:00 by kerem · 3 comments
Owner

Originally created by @davepgreene on GitHub (Apr 22, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/425

Is your feature already implemented in the latest master?
No

Is your feature request related to a problem? Please describe.
Right now the current method for getting search-like information from Spotify via the CLI is to use spotify_player get item <TYPE> --name. Unfortunately this only returns a single result rather than the list of results that the TUI returns when searching.

Describe the solution you'd like
A new CLI command called search which allows users to do the same kind of search that the TUI does.

Describe alternatives you've considered
N/A

Additional context
From poking through the codebase (I'm not super familiar with Rust so I'm sure I've missed something here) it looks like the CLI does item retrieval calls out directly to the artist, track, playlist, and track methods in rspotify. Would it be too much work to wire up the search method as well?

Originally created by @davepgreene on GitHub (Apr 22, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/425 **Is your feature already implemented in the latest `master`?** No **Is your feature request related to a problem? Please describe.** Right now the current method for getting search-like information from Spotify via the CLI is to use `spotify_player get item <TYPE> --name`. Unfortunately this only returns a single result rather than the list of results that the TUI returns when searching. **Describe the solution you'd like** A new CLI command called `search` which allows users to do the same kind of search that the TUI does. **Describe alternatives you've considered** N/A **Additional context** From poking through the codebase (I'm not super familiar with Rust so I'm sure I've missed something here) it looks like the CLI does item retrieval calls out directly to the `artist`, `track`, `playlist`, and `track` methods in rspotify. Would it be too much work to wire up the `search` method as well?
kerem 2026-03-02 23:45:43 +03:00
Author
Owner

@aome510 commented on GitHub (Apr 24, 2024):

Shouldn't be too difficult to define a search CLI command as client does provide search (github.com/aome510/spotify-player@2b8f2530cb/spotify_player/src/client/mod.rs (L832)) and search_specific_type (github.com/aome510/spotify-player@2b8f2530cb/spotify_player/src/client/mod.rs (L880))

<!-- gh-comment-id:2073867730 --> @aome510 commented on GitHub (Apr 24, 2024): Shouldn't be too difficult to define a `search` CLI command as client does provide `search` (https://github.com/aome510/spotify-player/blob/2b8f2530cba3c83f108dfc887f4666f356f8e86a/spotify_player/src/client/mod.rs#L832) and `search_specific_type` (https://github.com/aome510/spotify-player/blob/2b8f2530cba3c83f108dfc887f4666f356f8e86a/spotify_player/src/client/mod.rs#L880)
Author
Owner

@kadinsayani commented on GitHub (Apr 25, 2024):

Hi, I'd like to give this a try if that's okay with you? Thanks!

<!-- gh-comment-id:2077626352 --> @kadinsayani commented on GitHub (Apr 25, 2024): Hi, I'd like to give this a try if that's okay with you? Thanks!
Author
Owner

@aome510 commented on GitHub (Apr 25, 2024):

yes, please do. Lmk when you have a PR up

<!-- gh-comment-id:2077817035 --> @aome510 commented on GitHub (Apr 25, 2024): yes, please do. Lmk when you have a PR up
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#230
No description provided.