Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP search feature #94

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

victorcerutti
Copy link

Hello,

This PR is still a work in progress.
I wanted to check the need for it first before completing everything.

Usage:
spotify search <search query> will display the first 10 songs matching the query
A prompt will let you chose which one to play by entering 1 to 10
If you press enter, it displays the next 10 results
Other available commands are:
spotify search list <query>
spotify search album <query>
spotify search artist <query>

It uses the json parsing tool jq which I'm not sure is directly available in MacOS

Please let me know what you think about it.

@hnarayanan
Copy link
Owner

This is generally really cool idea, and will be gladly accepted into the repo when completed.

Please think of/discuss a few things.

  1. Please think through the UI (this thing with the 10 results, picking one etc.) and let's figure out if it is the best UX.
  2. I am not keen on introducing dependencies (like jq), so see if you can simplify things to the point you can work around it.
  3. It feels like there can be more code reuse between the existing find and play feature and this new search feature. But please hold off on programming anything until we better figure out (1) and (2).

@victorcerutti
Copy link
Author

Hi, thank you for your reply

  1. As it is now, I find the UI quite good, but I will think about possible improvements
  2. Parsing the json response without jq is doable but it's going to be painful. As all the Spotify API is built around json, I think it's a fair dependency to introduce. And it's relatively easy to install too via brew. If it's really not an option, I may try to parse the results with basic shell commands but I'm not sure I will have the time to do it soon
  3. Sure, there is some refactoring to do as "play" is already a search feature which plays the first result (except for playlists). As it's WIP and wanted your view on this feature, I'm still holding it off

@hnarayanan
Copy link
Owner

hnarayanan commented Feb 25, 2018

I understand there are projects like Homebrew that make tools like jq easy to install. It’s just that there are people (like me) who don’t use it. Try to think about alternatives and I will too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants