Bugzilla – Bug 916
Search results shouldn't show * in query
Last modified: 2008-08-18 10:53:01 UTC
When displaying the results of a search from the player UI we see: Songs Matching: "BE*" for a search for BE. The asterisk is confusing and should be omitted.
Given that searching for BE and BE* should, in theory return differing results (ie: BE returning only matches with the word BE, and BE* returning matches with words starting with BE) then this seems an approriate output to me. * is a standard wildcard character. The other option would be to recognise the * and change the message to read "Songs beginning with...". However, that is probably a lot of effort to achieve the same meaning. Of course, easy for me to say, since I dont find * a cause for confusion. Can you explain more why this bothers you?
Comments on this, Dean?
actually...considering there is also the expectation to be able to USE * as a valid character in filenames and tags, that is another reason it should show in the query. But then, we shouldn't be handling it as a wildcard.
oh, I think I see what is going on here. we used to have this working, but now that we have the search within words setting, the search term can be *BE* or BE* this could be useful as an indicator on the search setting. still, simply removing the *'s may not be the complete solution. Maybe a different top line output for each, but I can't think of anything good that still fits on the scren.
My point was that normal people don't know what the * means. Just strip it from the display.
how does this look? Index: Slim/Buttons/BrowseID3.pm =================================================================== --- Slim/Buttons/BrowseID3.pm (revision 2438) +++ Slim/Buttons/BrowseID3.pm (working copy) @@ -875,7 +875,9 @@ sub searchTerm { my $t = shift; - $t =~ s/^\*(.+)\*$/$1/; + + #depends on seachinwords setting + $t =~ s/^\*?(.+)\*$/$1/; return $t; }
committed r2460