kimtore / pms

Practical Music Search is an interactive Vim-like console client for the Music Player Daemon.
https://ambientsound.github.io/pms/
MIT License
249 stars 23 forks source link

feature request: fuzzy search #40

Closed jottr closed 7 years ago

jottr commented 7 years ago

When searching large libraries, it would be helpful if one could use fuzzy search. This would especially helpful when unsure about the correct spelling of an artist/album name. Something along the lines of fzf.

kimtore commented 7 years ago

Hi @jottr,

On the go branch, PMS uses a real search index to search for songs.

Would you mind giving it a spin to see if this works for you?

jottr commented 7 years ago

This might be caused by my lack of understanding the intricacies of go package management, but I get errors when trying to install your go packages:

$ echo $GOPATH
/Users/jottr/.go

$ echo $GOBIN
/Users/jottr/.go/bin

$ go get github.com/ambientsound/pms
package github.com/ambientsound/pms: no buildable Go source files in /Users/jottr/.go/src/github.com/ambientsound/pms

$ go get github.com/ambientsound/gompd
package github.com/ambientsound/gompd: no buildable Go source files in /Users/jottr/.go/src/github.com/ambientsound/gompd

Installing bleve and go-flags worked without issues.

kimtore commented 7 years ago

Thanks. Not sure about why you get these messages, although I'm confident that PMS still has been built, and that you should be able to run it.

Do you have a pms binary in $GOBIN? If not, try:

$ cd /Users/jottr/.go/src/github.com/ambientsound
$ rm -rf pms
$ git clone https://github.com/ambientsound/pms
$ cd pms
$ make
jottr commented 7 years ago

Sorry for the late response. Removing and cloning the pms repository worked. I'm having a hard time navigating the new user interface. Does this version not parse my ./config/pms/rc-file for shortcut settings?

jottr commented 7 years ago

I just realised that there is a new README for the go version. Will try to set it up to my needs and test. Sorry for the noise.

jottr commented 7 years ago

It seems that pms fuzzy searches within the artist, album, track-keys exclusively . Would it be possible to implement it, so that it searches across artist, album, track-keys? Given the following AwesomeArtist - NiceAlbum - BestTrack, it would be nice if one could drill down to a specific track by searching like so: awnibe.

kimtore commented 7 years ago

Thanks for testing, @jottr. I think it will be hard to make it search like this, because of the data model which the indexed data is stored under. It should be possible to search for aw ni be and get your results like this, can you try?

The approach you're suggesting would possibly require a full tag scan when searching, which would significantly lower the search speed.

Also interested in hearing your opinions on the user interface when you have adapted your configuration, or any suggestions that would make it easier for you!

jottr commented 7 years ago

Yes, that actually works. Pretty neat! I love the new version. Slightly off-topic: Has track seeking already been implemented? I couldn't find any related option key in the default config.

kimtore commented 7 years ago

By track seeking, do you mean seeking backwards and forwards within the current track? You're welcome to open a feature request, it should be trivial to implement at this point I think.

jottr commented 7 years ago

Exactly that.