Bug 896 - Browse by artwork halts on accented characters.
: Browse by artwork halts on accented characters.
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 6.0.0
: PC Windows XP
: P2 normal (vote)
: Future
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-01 13:27 UTC by Greg Hamilton
Modified: 2008-12-15 13:06 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments
Apostrophe does not display correctly (11.52 KB, image/pjpeg)
2005-03-10 09:09 UTC, Bart
Details
Browse Artwork shows one placeholder, one incorrect cover and two dupes (28.64 KB, image/jpeg)
2005-04-13 00:27 UTC, Bart
Details
Showing the wrong character for an apostrophe (40.35 KB, image/jpeg)
2005-04-13 00:39 UTC, Bart
Details
Showing the wrong character for an apostrophe (25.76 KB, image/jpeg)
2005-04-13 00:40 UTC, Bart
Details
Showing the correct artwork but wrong character for an apostrophe (40.52 KB, image/jpeg)
2005-04-13 00:42 UTC, Bart
Details
Logfile from running with "--d_musicmagic --d_info" (185.88 KB, text/plain)
2005-04-13 00:57 UTC, Bart
Details
MusicMagic library file (temp.m3lib) (8.39 KB, application/octet-stream)
2005-04-13 00:58 UTC, Bart
Details
Slimserver db with the example tracks (56.00 KB, application/octet-stream)
2005-04-13 01:29 UTC, Bart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Hamilton 2005-03-01 13:27:16 UTC
When browseing by artwork I have noticed that it stops displaying covers,
whenever the album name contains accented characters.  Enabled --d_artwork and
it shows it stopping at the last displayed cover, but nothing for the missing
ones. Firefox status shows it "waiting for localhost."  If I click on the >> to
go to the next page it does resume but will stop again, when it has another
accented character.

My first album with an accented charater is

file:///O:/My Music/Caetano Veloso e Gilberto Gil/Tropic�lia 2/01 Haiti.mp3

I'm also using moodlogic, with no Audiodir defined.
Comment 1 Bart 2005-03-01 14:49:32 UTC
I have a lot of covers that never display and there does not seem to be a 
pattern, except that it is the same covers every time, so I was interested in 
your report that it is covers with an accent.  However I have many covers with 
an accent in the folder name which display and many without that don't.
I also get multiple instances of the same cover displayed. 
I think it is valuable to get reports from people out in the real world who 
have their files tagged and arranged in different ways - it can only make the 
code and the application more robust.
I am happy to post any covers, files, databases, logfiles, more information, 
whatever will help,
Comment 2 KDF 2005-03-02 12:47:21 UTC
*** Bug 912 has been marked as a duplicate of this bug. ***
Comment 3 Dan Sully 2005-03-02 14:42:04 UTC
I have a pending patch for this, just doing some additional testing.

Will likely have it checked in today.
Comment 4 Dan Sully 2005-03-02 20:09:25 UTC
Ok - I've checked in a fix as subversion change 2297.
Comment 5 Greg Hamilton 2005-03-03 08:14:23 UTC
Dan,  revision 2300 is producing this error when browsing by Artwork
This is after "Wipe Cache" 

C:\Program Files\slimperl\trunk\server>perl slimserver.pl --d_moodlogic
--d_artwork --d_info
2005-03-03 10:58:53.0999 loading types config file...
2005-03-03 10:58:53.1309 Tag database support is ON, saving into: C:\Program
Files\slimperl\trunk\server\Cache\slimserversql.db
2005-03-03 10:58:53.1616 Connected to database dbi:SQLite:dbname=C:\Program
Files\slimperl\trunk\server\Cache\slimserversql.db
2005-03-03 10:58:53.1758 No upgrades found for database v. 4
2005-03-03 10:58:53.3844 DBI: Supressing periodic commit - no dirty items
2005-03-03 10:58:53.3858 Adding Folder Scan
2005-03-03 10:58:58.1472 Adding MoodLogic Scan
2005-03-03 10:59:23.3936 DBI: Supressing periodic commit - no dirty items
2005-03-03 10:59:50.8130 Scanning with 0 import plugins
2005-03-03 10:59:50.9586 Scanning with 0 import plugins
2005-03-03 10:59:53.3969 DBI: Supressing periodic commit - no dirty items
2005-03-03 10:59:55.5848 browsedb - hierarchy: artwork,track level: 0
2005-03-03 10:59:55.5853 Scanning with 0 import plugins
2005-03-03 10:59:55.5879 Scanning with 0 import plugins
Can't call method "coverArt" on an undefined value at C:/Program
Files/slimperl/trunk/server/Slim/Web/HTTP.pm line 797.

Comment 6 Greg Hamilton 2005-03-03 08:25:08 UTC
Additional log information created by turning on d_http

2005-03-03 11:21:48.9920 generating from browsedb_artwork.html
2005-03-03 11:21:48.9958 generating from browsedb_artwork.html
2005-03-03 11:21:48.9997 generating from browsedb_artwork.html
2005-03-03 11:21:49.0028 generating from browsedb.html
2005-03-03 11:21:49.2670 End request: keepAlive: [27] - waiting for next request
on connection = Keep-Alive

2005-03-03 11:21:49.2693 No more messages to send to 127.0.0.1
2005-03-03 11:21:49.2962 No segment to send to 127.0.0.1, waiting for next request..
2005-03-03 11:21:49.8426 reading request...
2005-03-03 11:21:49.8429 HTTP request: from 127.0.0.1
(HTTP::Daemon::ClientConn=GLOB(0x3c2b784)) for GET HTTP/1.1 /m
.jpg
2005-03-03 11:21:49.8441 processURL Clients:
2005-03-03 11:21:49.8446 Generating response for (jpg, image/jpeg)
music/11257/thumb.jpg
2005-03-03 11:21:49.8468 Cover Art asking for: thumb
Can't call method "coverArt" on an undefined value at
C:/PROGRA~1/slimperl/trunk/server/Slim/Web/HTTP.pm line 797.
Comment 7 Dan Sully 2005-03-03 15:40:57 UTC
Greg - I checked in a fix for this today. Can you sync up with subversion (or wait for the daily build), 
and let me know?

Thanks.
Comment 8 Jim 2005-03-04 02:34:57 UTC
I've been having problems with artwork but this fix has solved them all.  Thanks.
Comment 9 Bart 2005-03-04 07:13:47 UTC
I now have some placeholder images appearing instead of the actual cover art.  
On some of them, if I click on the image I am taken to the page for that 
album, with the correct cover art displayed, on others I am taken to a blank 
page with "0 albums with 0 songs by 0 artists"
This is with the Default skin and Fishbone in Internet Explorer in Windows and 
Mozilla on Linux.
Comment 10 KDF 2005-03-04 11:06:03 UTC
make sure you've erased the db file and rescanned.  If you still have the
placeholder image, try to provide details about which ones are failing.  audio
format, image format, how you added the artwork, etc.
Comment 11 Bart 2005-03-04 13:08:55 UTC
I have deleted the db file and rescanned.
All the tracks are in MP3 format and all the cover art is JPGs called 
cover.jpg in the same directory as the tracks.
three covers that don't display and link to a blank page are 300x262 pixels , 
300x299 pixels and 334x300 pixels.
One cover that does not display, but links to the correct page (and displays 
on that page) is 298x300 pixels.
My directory structure has one directory for each artist with all the tracks 
for the artist, from all their albums, in the top level of that directory.  
There is only one cover.jpg in each directory, thus "Browse Artwork" often 
diplays the wrong album cover (but the right artist), this is something I am 
aware of and will need to work on tidying up.  I am not sure that it has ay 
bearing on this problem as all the directories are like this but most display 
the cover art correctly.
Comment 12 KDF 2005-03-04 13:19:20 UTC
Thanks.  I've got one cover in my setup that does the same thing.  Each cover
image URL contains a track ID (since any track can have its own artwork).  In my
case, the track ID seems to refer to a non-existent track.

Can you try this and post your findings:
view image for each of the bad cover art (on Firefox, this is in the right-click
menu, but you can also view properties to find the url)
take note of the track id. eg: http://server:9000/music/8554/thumb.jpg (track id
is 8554)
then load the following url, using your trackid:
http://server:9000/songinfo.html?item=8554

do they all come up as invalid tracks?
Comment 13 Greg Hamilton 2005-03-04 14:20:38 UTC
Additional news:

Problems may be related to duplicate tracks and they way Moodlogic will only
recognize one of them.  In my case.

Album was American Beauty Soundtrack
Track 04 - All Right Now, by Free existed in two directories.

#1 \My Music\Free\Unknown\All Right Now.mp3
    Tagged with Album of "Unknown" and no track #.
#2 \My Music\Soundtracks\America Beauty\04 All Right Now.mp3
    Properly tagged Album and track.



Moodlogic had #1 in it's library.  Somehow this was confusing SlimServer.  I
confirmed this by:

Deleted #1 from Moodlogic and the harddrive.
Using Moodlogic, added new music.
Let importer complete in Slimserver
Browse Artwork.

This allowed the browse by artwork to properly display the cover art
Comment 15 KDF 2005-03-04 22:26:42 UTC
Thanks for that, Bart.  That matches what I saw.  I wiped the db and started a
rescan to focus on the one case I had.  It did not occur.  I'll have to leave
this to Dan to see if he has any thoughts on how that could happen.  However, it
may mean a rescan will have you up with full artwork too.
Comment 16 Bart 2005-03-05 04:27:41 UTC
I have just deleted the directory and done a clean install of 05 March build, 
reimported the data - still have placeholder images and blank pages, on the 
same tracks
Comment 17 Dan Sully 2005-03-05 12:11:23 UTC
Bart - could those be bogus tracks from MusicMagic?

KDF - are we checking to see if the track exists on disk for MoodLogic (and MM) scans? That could be 
causing part of Greg's problem, if we blindly add the track because ML says it's there.
Comment 18 KDF 2005-03-05 12:50:51 UTC
we grab the info given by the importer then pass to updateOrCreate where it does
a readTags.  I would expect that is the best place to do such a check since
we're already attempting to open/read the file. I'll look there.
Comment 19 Bart 2005-03-05 13:46:30 UTC
I don't think they are bogus tracks - MusicMagic can find the track, display 
the correct details for it, and send it to the player.
All the music is on a read-only share and is only ocassionally updated.  I 
rescanned MusicMagic after the last update and I have rescanned today.
Comment 20 Bart 2005-03-07 04:07:59 UTC
I see what the problem is.  The tracks have an apostrophe in the name so the 
importer fails to import them properly.
...2005-03-07 11:01:01.1109 MusicMagic: Exporting song 2361: M:\Carole 
King\Carole King - You�ve Got A Friend.mp3
2005-03-07 11:01:01.1135 New track for file:///M:/Carole%20King/Carole%20King%
20-%20You
2005-03-07 11:01:01.1141 readTag was set for file:///M:/Carole%20King/Carole%
20King%20-%20You
...etc
Comment 21 Bart 2005-03-07 05:47:25 UTC
On further investigation I see that there are other tracks (without any cover 
art) which have not been imported because they have an apostrophe.
It is the apostrophe that slopes to the right (�) which appears to be the 
problem (does that make sense?)
Comment 22 Dan Sully 2005-03-08 11:14:31 UTC
Bart - i don't quite understand the issue. The log you pasted doesn't have any apostrophe's in it at all.
Comment 23 KDF 2005-03-08 12:04:32 UTC
Dan,
it looks like the filename includes the single quote character (in You've), so
somehow by the time it gets to readTags, its been truncated (to You):

...2005-03-07 11:01:01.1109 MusicMagic: Exporting song 2361: M:\Carole 
King\Carole King - You�ve Got A Friend.mp3

becomes:
2005-03-07 11:01:01.1135 New track for file:///M:/Carole%20King/Carole%20King%
20-%20You (the rest is not there!)
Comment 24 Bart 2005-03-08 12:10:26 UTC
Yes, the apostrophe is in the filename (...You've...) but then gets truncated 
to You
Same for the other tracks (Debbie�s becomes Debbie, etc)
Comment 25 KDF 2005-03-10 03:11:24 UTC
lets try to break this down a bit.  I can see that we have file scan, music
magic and moodlogic going on around this.  Lets take one at a time.  Does this
issue exist when using Music Folder only?  If so, please supply d_info output
for that file or a few examples of files.
Comment 26 Bart 2005-03-10 09:09:10 UTC
On my XP machine I wiped the cache, turned off MusicMagic and let Slimserver 
read from the music directory.  When it had finished the artwork was correctly 
displayed and the tracks with right-sloping apostrophes were present (although 
in the web interface in Internet Explorer on XP the apostrophe is rendered as 
a square symbol)
the --d_info log shows:
2005-03-10 15:50:41.7063 readTag was set for file:///M:/Carole%20King/Carole%
20King%20-%20You%E2%80%99ve%20Got%20A%20Friend.mp3

I uploaded the before and after databases from the XP machine:
database where I imported from MusicMagic
https://www.bris.ac.uk/fluff/u/ecbjm/2qVCgR2lERPI6BZ0r4384QcT/
database where I turned off MusicMagic and let Slimserver read the music 
directory
https://www.bris.ac.uk/fluff/u/ecbjm/BzL2QvNPl8Bg_GnJdvPRsgcT/
Comment 27 Bart 2005-03-10 09:09:45 UTC
Created attachment 317 [details]
Apostrophe does not display correctly
Comment 28 Dan Sully 2005-03-10 16:41:54 UTC
What version of MusicMagic are you using, Bart?
Comment 29 Dan Sully 2005-03-10 17:08:45 UTC
Bart - can you try this:

Edit Plugins/MusicMagic/Plugin.pm

At line 444, change:

$songInfo{$key} = Encode::encode('utf8', $songInfo{$key}, Encode::FB_QUIET());

to:

Encode::_utf8_on($songInfo{$key});

and scan with MusicMagic on.

Thanks.
Comment 30 Bart 2005-03-11 00:29:55 UTC
I am using MusicMagic 1.1.5b1, on the same XP machine as Slimserver
However,as the music analysis took several weeks and I built this machine in 
the process, some of it was done on a different XP machine and the MusicMagic 
database was copied to this machine to finish the analysis.
Comment 31 KDF 2005-03-11 00:40:57 UTC
1.1.5?? jeez....I only heard about a 1.1.4 beta 10 days ago. tell you what, put
some of the same effort you put in here leaning on Predixis to fill us in
without us having to dig so darn much and it will go a long way to helping keep
things goin :) I wonder if they realise the main guy on musicmagic stuff for
slimserver is working for free ;) I've only JUST starting putting in stuff that
goes above 1.1.3.  I'm not sure I can stand by 1.1.5 support right now, given
how much of a trip up exists between 1.1.3 & 4

Comment 32 Bart 2005-03-11 06:25:34 UTC
I made the change at line 444, wiped the cache and rescanned with MusicMagic 
on.
I still get the placeholder instead of the cover in "Browse Artwork"
However, when I click on the image I now get the tracklisting for the album.
The apostrophes in the name still display as boxes.
So, without MusicMagic the correct thumbnail is displayed in "Browse Artwork", 
the album and track information is present but the apostrophes don't display 
properly.
Importing from MusicMagic the correct thumbnail does not display in "Browse 
Artwork", and the track information is missing for tracks with an apostrophe 
in their name.
Importing from MusicMagic with the change in line 444 the thumbnail does not 
display in "Browse Artwork", but the track information is present for tracks 
with an apostrophe in their name although the apostrophe displays as a box.
Comment 33 Dan Sully 2005-03-13 20:52:55 UTC
Bart - I believe this is now in direct relation to bug 881
Comment 34 Dan Sully 2005-03-15 15:10:58 UTC
Bart - has the fix for 881 helped this problem at all?

Thanks.
Comment 35 Bart 2005-03-16 04:27:40 UTC
With a clean install of the 16 Mar build on XP I made a subset of my music 
directories, containing four albums that have cover art and tracks with 
apostrophes and one album that has a track with an apostrophe but no cover art.
I scanned without MusicMagic and opened the web interface in IE on XP.
I got the placeholder thumbnail for one album, the other three displayed 
correctly.  All the albums have the tracks listed when I click on them but all 
the apostrophes show as squares.

I then ran MusicMagic, scanned the test directory, deleted the Slimserver 
cache and restarted Slimserver.
Now I am missing all of the files that have an apostrophe in them and the 
artwork is only displaying for two out of four albums and there is one 
placeholder thumbnail.

I was going to zip up and upload the test directory but it is 66Mb, although 
it is not a problem for me to upload it if it will help.
Comment 36 Dan Sully 2005-03-17 17:40:22 UTC
Bart - that zipfile would be useful.

Thanks.
Comment 37 Bart 2005-03-18 01:12:44 UTC
I took out some tracks, leaving just the ones causing a problem and a couple of 
others.  File size is now 45Mb and it is at 
https://www.bris.ac.uk/fluff/u/ecbjm/YSZqWT2i9qr_Dsf2K4TIkgd1/
Comment 38 Dan Sully 2005-03-23 22:00:00 UTC
Bart - sorry I didn't get to this in time. The file's been removed. Could you
upload it again?

Thanks.
Comment 39 Bart 2005-03-26 08:41:18 UTC
Yes, of course, but I have gone away for Easter. I will upload it when I get 
back...
Comment 40 Bart 2005-04-04 03:55:14 UTC
I have uploaded a zip file to 
https://www.bris.ac.uk/fluff/u/ecbjm/xPisktGwpbULObPwzvXZpgdi
Comment 41 Dan Sully 2005-04-11 18:40:38 UTC
Bart - I finally got around to looking at that track. The only one I see as
invalid is the Carole King "You've Got A Friend".

What should be an apostrophe character isn't - it shows up as Unicode char 92,
which is empty. And shows up garbled on other file systems.

What did you use to rip that track? And which CDDB service did you use as well?

Is anyone else still having this issue with any other tracks?

Thanks.
Comment 42 Bart 2005-04-13 00:27:34 UTC
Created attachment 417 [details]
Browse Artwork shows one placeholder, one incorrect cover and two dupes
Comment 43 Bart 2005-04-13 00:38:11 UTC
If I make a library containing just the tracks I zipped then I see several 
problems.  "Browse Artwork" shows one placeholder, two dupes and one incorrect 
image.  "Browse Artist" shows the square symbol instead of the apostrophe.  
I am on XP, the locale program from bug 881 reports "locale: cp1252".  I am 
running MusicMagic 1.1.5b4
The zip file I made contained a few example tracks but I have this problem 
with many tracks in my library.
I have used Razorlame with a recent version of lame for several years, but 
older tracks may have been ripped with something else.  I have used EAC for 
several years too, with freedb.
Comment 44 Bart 2005-04-13 00:39:55 UTC
Created attachment 418 [details]
Showing the wrong character for an apostrophe
Comment 45 Bart 2005-04-13 00:40:14 UTC
Created attachment 419 [details]
Showing the wrong character for an apostrophe
Comment 46 Bart 2005-04-13 00:42:24 UTC
Created attachment 420 [details]
Showing the correct artwork but wrong character for an apostrophe

The artwork for this album did not display in "Browse Artwork" (it was the
album with the placeholder image), but it displays when you click on the
placeholder. Two tracks are showing the wrong character for an apostrophe
Comment 47 Bart 2005-04-13 00:57:24 UTC
Created attachment 422 [details]
Logfile from running with "--d_musicmagic --d_info"
Comment 48 Bart 2005-04-13 00:58:52 UTC
Created attachment 423 [details]
MusicMagic library file (temp.m3lib)
Comment 49 Bart 2005-04-13 01:00:38 UTC
Comment on attachment 423 [details]
MusicMagic library file (temp.m3lib)

C:\Program Files\Predixis\MusicMagic Mixer\temp.m3lib
Comment 50 Bart 2005-04-13 01:29:18 UTC
Created attachment 424 [details]
Slimserver db with the example tracks
Comment 51 Blackketter Dean 2005-04-20 14:06:21 UTC
dan is going to look at this for 6.0.2
Comment 52 Bart 2005-06-04 15:14:18 UTC
Several times I have tried to play a track that I knew was in my collection, 
but Slimserver refused to admit it was there, so yesterday, in desperation, I 
went through my whole collection and renamed and retagged all the tracks I 
could find with right sloping apostrophes (�)
Now I can see and play all the tracks, but this seems a little drastic - I 
would rather Slimserver was able to deal with � in a filename or tag
Comment 53 Dan Sully 2005-06-04 15:19:17 UTC
Bart - I checked in some unicode/filesystem handling changes about 3 days ago on the 6.1 trunk.

Could you give that a try?

Thanks
Comment 54 Bart 2005-06-05 03:06:43 UTC
I have downloaded the latest 6.1 nightly, but, as I had renamed and retagged 
the tracks that would not work, I will have to get the original files off a 
backup to test them.  I will try to do this today...
Comment 55 Bart 2005-06-08 00:15:28 UTC
The reason I had renamed and retagged some files was because they were not 
being imported, because of the apostrophe which slopes to the right (�), as I 
identified in comment #21 below.  I undid these changes by recovering the 
files from a backup and I downloaded the latest nightly.
I put the old music files back, from the backup, refreshed the MusicMagic 
library and then wiped the Slimserver cache and rescanned.
The tracks now appear, but they have a question mark in place of the 
apostrophe.  This is an improvement, because at least they are now playable.  
It does mean that I now have, for example, an artist called Sinead O'Connor 
and another called Sinead O?Connor 
On XP, with the 6.1 nightly from 5th June, "SlimServer Version: 6.1.0 - 3077 - 
locale: cp1252" and using MusicMagic 1.1.5.1 
Comment 56 Dan Sully 2005-08-27 13:19:05 UTC
This should not be an issue with the latest 6.2 nightlies.

Please reopen if for some reason it is.
Comment 57 James Richardson 2008-12-15 13:06:10 UTC
This bug appears to have been fixed in the latest release!

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.

Make sure to include the version number of the software you are seeing the error with.