Bug 4057 - Database treats special characters inconsistently
: Database treats special characters inconsistently
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.5b1
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-05 23:15 UTC by Simon Turner
Modified: 2008-09-15 14:39 UTC (History)
4 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Turner 2006-09-05 23:15:02 UTC
Square brackets and forward slashes aren't removed in the normalized titlesort and titlesearch columns of the SlimServer database. This is inconsistent with the treatment of other punctuation characters.

For instance entering MFSL into the SlimServer search (using the default setting of "Search beginning of words") will return an album tagged as:

Folk Singer (MFSL Ultradisk II remaster)
but not as
Folk Singer [MFSL Ultradisk II remaster]
Comment 1 KDF 2006-09-05 23:36:33 UTC
please do not preset targets.  leave undef to flag for review.
I believe that change 9433 was intended to fix this.
Comment 2 Chris Owens 2006-09-06 09:18:19 UTC
Ross could you please make sure this is reproducible?
Comment 3 Ross Levine 2006-09-06 12:09:03 UTC
Simon,

Are you refering to the tags / comments within a file, or is this a part of the actual file name? Could you maybe attach a sample file if it's reasonable? 
Comment 4 Simon Turner 2006-09-06 13:41:27 UTC
I think Dan (Perl Commando) may have sorted this one (see KDF's comment).
It's an album tag. It's easily reprodusable. Just put square brackets around any word in an album tag and try searching for that word (default search setting, i.e. search beginning of words). You'll get no results as the square barcket is treated as a normal letter. If you put normal curved brackets round the word all is OK. Square brackets should be treated the same... and I am sure there may be a small can of worms with other odd characters too.
MC
Comment 5 Ross Levine 2006-09-06 15:57:39 UTC
Simon,

Thanks very much for clarifying. I'm definitely seeing this bug now!

To reproduce this I edited an mp3 tag and changed the album name to [abc123], I also changed another mp3's album tag to say (abc123). 

When doing a simple search for abc123, only the rounded parenthesis showed up, the bracketed file did not. 

SlimServer Version: 6.5b1 - 8964
Comment 6 Chris Owens 2006-09-07 14:09:52 UTC
I see Dan has marked this as fixed yesterday morning.

Simon, if you're still experiencing this with the latest nightlies, please re-open the bug.
Comment 7 Simon Turner 2006-09-08 13:46:43 UTC
Using 08th Sept nightly, the bug is still there and other oddities have been introduced.

Server settings/Behaviour/SEARCH WITHIN WORDS set to "Search beginnings of word"

Search for MFSL.
The search completes before I hit the search button with this result:

Artists matching "MFSL": 0
Albums matching "MFSL": 1
Aja [1999 MFSL Gold remaster]
Play Add to playlist
Song titles matching "MFSL": 0

If I then hit the search button I receive a different thing:

Albums matching "MFSL": 1
Aja [1999 MFSL Gold remaster] by Steely Dan

Why should the results be different? There is no indication why this should be so.

Using the Advanced Searchs results are equally squiffed:

  2. Aja  from Aja [1999 MFSL Gold remaster]  by Steely Dan
Play Add to playlist
1. Black Cow from Aja [1999 MFSL Gold remaster] by Steely Dan
Play Add to playlist
3. Deacon Blues from Aja [1999 MFSL Gold remaster] by Steely Dan
Play Add to playlist
5. Home At Last from Aja [1999 MFSL Gold remaster] by Steely Dan
Play Add to playlist
6. I Got The News from Aja [1999 MFSL Gold remaster] by Steely Dan
Play Add to playlist
7. Josie from Aja [1999 MFSL Gold remaster] by Steely Dan
Play Add to playlist
4. Peg from Aja [1999 MFSL Gold remaster] by Steely Dan 

The ordering is wrong plus I only searched using the Album field... so I'd expect to be returned albums not songs.
------------------------------------------------------------------

But.... the main thing is that the original bug is not rectified.

A search for MFSL on the simple search or the album field of the advanced search should return tracks/songs with this in the titles:  [MFSL   or   .MFSL     but the only results for MFSL that I am returned with have a space before MFSL.
Comment 8 KDF 2006-09-08 13:52:21 UTC
the results are different becuase they are different code.
see bug 4063 for one possible cause (the params causing the bug, probably relate to the different results)
Comment 9 Simon Turner 2006-09-11 00:36:16 UTC
This bug is still apparent in Slimserver 6.5b2
Comment 10 Dan Sully 2006-09-11 18:46:10 UTC
Simon - did you wipe & rescan your database?

Your test album title is working fine for me here.

Thanks
Comment 11 Simon Turner 2006-09-11 19:38:38 UTC
I didn't. I have now and it works fine. Thanks very much.