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

Searching with spaces does not work #44

Open
dumblob opened this issue Nov 27, 2012 · 1 comment
Open

Searching with spaces does not work #44

dumblob opened this issue Nov 27, 2012 · 1 comment

Comments

@dumblob
Copy link

dumblob commented Nov 27, 2012

When searching the playlist for some string containing space, it doesn't find any match. I've tested this on both GTK2 and GTK3 versions.

My idea for searching in the following playlist:

  1. Abc Xyz
  2. Jkl xyz Mno
  3. Pqr Stuvw Xyz

yields:
if the search term is "abc", it matches only the first item
if the search term is "abc xyz", it matches only the first item
if the search term is "abc xyz" (notice the double-space in between), it matches only the first item
if the search term is " abc xyz " (notice the redundant spaces at the beginning and at the end), it matches only the first item
if the search term is " abc xyz " (many spaces on many places :-)), it also matches te first item
if the search term is " Xyz ", it matches the first and last item, but not the second one (but " xyz " would match all 3 items)

Simply said, handle any number of consecutive white characters in between of words/tokens as regexp [:space:]+ and in case of consecutive white characters at the beginning or at the end of search term, use the regexp [:space:]* for finding matches in the playlist. This is really usefull when the tag contains e.g. tabulator instead of space; or two spaces instead of one etc.
And be case insensitive when the search term doesn't contain any upper case characters and be case sensitive if the search term contains at least one upper case character.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@matiasdelellis
Copy link
Contributor

Hi dumblob,
Sorry for the delay, and thanks for every suggestion. ;)

Well.. All we ask, is relatively simple. But I worry that the search now is already sufficiently slowly.. :s

I want to do it, but first we try to optimize the code we have..

Regards.

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

No branches or pull requests

2 participants