Bug 4871 - Adding playlist of existing songs with accented chars create new entries in database
: Adding playlist of existing songs with accented chars create new entries in d...
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 6.5.2
: Linkstation Debian Linux
: P2 normal with 1 vote (vote)
: ---
Assigned To: Spies Steven
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-28 03:45 UTC by Daniel Born
Modified: 2008-12-18 11:12 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
I set some debugs on and tried adding the same playlist under a different name (218.57 KB, text/plain)
2007-03-28 12:46 UTC, Daniel Born
Details
This is the playlist from MusicIP on WinXP (643 bytes, application/octet-stream)
2007-03-28 13:42 UTC, Daniel Born
Details
This is the linux playlist file (10.00 KB, application/octet-stream)
2007-03-28 13:46 UTC, Daniel Born
Details
This is a playlist generated from slimserver with some of the offending songs (10.00 KB, application/octet-stream)
2007-03-28 13:47 UTC, Daniel Born
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Born 2007-03-28 03:45:28 UTC
This problem was experienced with the official v6.5.1 release and the v6.5.2 nightly from 2007-03-27.
My music is stored on a Linkstation running FreeLink 1.11 (Debian Sarge) with the latest samba (v3.x) which stores filenames in UTF8 format. I also upgraded to the latest MySql (v5.x)

The locale is set properly and it is displayed in Slimserver's server setup page as 'utf8'.
I use my own copy of MySql to store the database (I followed the instructions on the wiki to set it up). First the database was set up by default as 'latin1' by MySql. I then deleted it and recreated it with all defaults set to 'UTF-8'. (same problem with both database versions).

My database is now fine and all special accented characters appear properly everywhere.
If I create a playlist (from MusicIP on WinXP PC but converted to linux/utf-8 format by a script), all music is found and playlists plays fine on the Squeezebox but all songs that had accented characters in the filename and/or directory name will end up creating a new album with only those songs in it. Songs with non-accented character filenamess do not create these double entries.
The playlist file is also in utf8 format (with proper header \xbf\xfe\xff or something close to that (doing it from memory)).

My comprehension of the situation is that the code that reads the playlist will not find the stored song in the database, so it creates a new entry for it. Interestingly, one playlist with several problem files contain two songs from the same album with accented characters in the filename. Both will not be found in the database but these do not create a new album for each song but only one new duplicated album with both of those songs in that album!
Comment 1 Spies Steven 2007-03-28 10:29:41 UTC
Daniel, are you running SlimServer on your LinkStation or just serving files from it? It may help to paste the version info from server settings into your reply. It may also be helpful if you were to attach the playlist files in question before and after conversion to this bug.
Comment 2 Daniel Born 2007-03-28 12:43:47 UTC
(In reply to comment #1)
> Daniel, are you running SlimServer on your LinkStation or just serving files
> from it? It may help to paste the version info from server settings into your
> reply. It may also be helpful if you were to attach the playlist files in
> question before and after conversion to this bug.

Hi, I am running SlimServer from the Linkstation (which is running Debian Linux).
 
Here is the version info from the server:
SlimServer Version: 6.5.2 - 11677 - Debian - EN - utf8
Server IP address: 192.168.1.3
Perl Version: 5.8.8 powerpc-linux-gnu-thread-multi
MySQL Version: 5.0.32-Debian_7-log 

 

You will have guessed that the Mere.zip is the playlist on WinXP (from MusicIP) and Mere.tar is from linux. I have a perl script that copies and transfers the playlist for slimserver. :)

I also included a playlist generated from SlimServer (Test.m3u) of that "offending" album which contains two songs that are in "Mere.m3u".

Comment 3 Daniel Born 2007-03-28 12:46:21 UTC
Created attachment 1887 [details]
I set some debugs on and tried adding the same playlist under a different name
Comment 4 Daniel Born 2007-03-28 12:51:31 UTC
From the debugs, it appears that the data gets converted internally into iso8859-1 (aka Latin1) internally. All the data on my system should be in UTF-8 format. (track filenames and directory names, playlist names and contents, tags in mp3 tracks id3v2.4 utf-8).
Comment 5 Spies Steven 2007-03-28 13:24:20 UTC
Daniel, it appears your playlist files did not attach to the bug. Would you go to bugzilla and try attaching them again?
Comment 6 Daniel Born 2007-03-28 13:42:52 UTC
Created attachment 1888 [details]
This is the playlist from MusicIP on WinXP

This playlist contains DOS paths and is in iso8859-1 charset.
Comment 7 Daniel Born 2007-03-28 13:46:14 UTC
Created attachment 1889 [details]
This is the linux playlist file

This is the script generated playlist that has now linux paths and uses UTF-8 charset.
"M:\" gets converted to "/mnt/music"
All "\" in paths get converted to "/"
All CrLf get converted to nl (\13\10 to \10)
Comment 8 Daniel Born 2007-03-28 13:47:54 UTC
Created attachment 1890 [details]
This is a playlist generated from slimserver with some of the offending songs

This is just a reference playlist to show what a slimserver generated playlist should look like.
Comment 9 Spies Steven 2007-03-28 16:13:12 UTC
Possibly bug 4578 and this one is related.
Comment 10 Daniel Born 2007-03-29 00:52:05 UTC
Yes and it seems that bug is also related to #4276 (2006/10)...

For now, I've removed all accented characters from pathnames/filenames as it seems it's been an ongoing issue and even present in 7.0 (meaning it's complicated to resolve?)
Comment 11 Chris Owens 2007-05-15 14:41:53 UTC
We're not going to get this fixed for 6.5.2.  Leaving it open against 7.0 for Steven to continue working on it.
Comment 12 Michael Herger 2007-12-21 04:52:56 UTC
Is this still an issue in 7.0? Please update or close this bug.
Comment 13 Michael Herger 2008-01-08 11:52:03 UTC
This should be fixed. Feel free to re-open if needed.
Comment 14 Chris Owens 2008-03-07 09:05:10 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.