Bug 2783 - Duplicate track names with iTunes and ampersand in artist or album name
: Duplicate track names with iTunes and ampersand in artist or album name
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.2.1
: Macintosh MacOS X 10.4
: P3 major (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-04 09:48 UTC by Craig Hockenberry
Modified: 2008-09-15 14:38 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
debug trace of duplicate tracks during a scan (164.81 KB, text/plain)
2006-01-25 11:24 UTC, Ben Gladstone
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Hockenberry 2006-01-04 09:48:23 UTC
When Server Settings are set to "Use iTunes", tracks with an ampersand in either the artist name or album name result in the track being displayed twice in the UI.

For example, the album "Exodus" by "Bob Marley & The Wailers" results in:
----- 
1. Natural Mystic from Exodus by Bob Marley & The Wailers
1. Natural Mystic from Exodus by Bob Marley & The Wailers
2. So Much Things To Say from Exodus by Bob Marley & The Wailers
2. So Much Things To Say from Exodus by Bob Marley & The Wailers
3. Guiltiness from Exodus by Bob Marley & The Wailers	 	 
3. Guiltiness from Exodus by Bob Marley & The Wailers	 	 
4. The Heathen from Exodus by Bob Marley & The Wailers	 	 
4. The Heathen from Exodus by Bob Marley & The Wailers	 	 
5. Exodus from Exodus by Bob Marley & The Wailers	 	 
5. Exodus from Exodus by Bob Marley & The Wailers	 	 
6. Jamming from Exodus by Bob Marley & The Wailers	 	 
6. Jamming from Exodus by Bob Marley & The Wailers	 	 
7. Waiting In Vain from Exodus by Bob Marley & The Wailers	
7. Waiting In Vain from Exodus by Bob Marley & The Wailers	 
8. Turn Your Lights Down Low from Exodus by Bob Marley & The Wailers
8. Turn Your Lights Down Low from Exodus by Bob Marley & The Wailers
9. Three Little Birds from Exodus by Bob Marley & The Wailers	 
9. Three Little Birds from Exodus by Bob Marley & The Wailers	 
10. One Love/People Get Ready from Exodus by Bob Marley & The Wailers
10. One Love/People Get Ready from Exodus by Bob Marley & The Wailers
-----
(All tracks are duplicated because of the & in the artist name.)

The album "Music In Mouth" by "Bell X1" results in:
-----
1. Snakes & Snakes from Music In Mouth by Bell X1	 	 
1. Snakes & Snakes from Music In Mouth by Bell X1	 	 
2. Alphabet Soup from Music In Mouth by Bell X1	 	 
3. Daybreak from Music In Mouth by Bell X1	 	 
4. Eve, The Apple Of My Eye from Music In Mouth by Bell X1
5. Next To You from Music In Mouth by Bell X1	 	 
6. West Of Her Spine from Music In Mouth by Bell X1	 	 
7. Bound For Boston Hill from Music In Mouth by Bell X1	 	 
8. Tongue from Music In Mouth by Bell X1	 	 
9. White Water Song from Music In Mouth by Bell X1	 	 
10. In Every Sunflower from Music In Mouth by Bell X1	 	 
11. I'll See Your Heart & I'll Raise You Mine from Music In Mouth by Bell X1
11. I'll See Your Heart & I'll Raise You Mine from Music In Mouth by Bell X1
12. Eve, The Apple Of My Eye (Single Version) from Music In Mouth by Bell X1
-----
(track 1 and 11 are duplicated because of the & in the track name.)

This problem does not occur with the "Do Not Use iTunes" setting in Server Settings. This suggests that the problem might be in the XML processsing of the iTunes Library.
Comment 1 KDF 2006-01-04 10:52:54 UTC
Have you tried the 6.2.2 nightly yet?
Comment 2 Craig Hockenberry 2006-01-06 11:41:33 UTC
I'm still seeing the problem with the latest nightly build:

SlimServer Version: 6.2.2 - 5520 - Mac OS X 10.4.3 (8F46) - EN - utf8

I did a Server Settings > Rescan Music Library > Clear library and rescan everything after installing the new software.

While the library was being rebuilt, I noticed that one of the "Bob Marley & The Wailers" albums looked OK at the start. After the rebuild was complete, the album had duplicate tracks. This suggests that the tracks are being processed twice, causing duplicate entries in the database.
Comment 3 KDF 2006-01-06 13:48:09 UTC
The tracks will be processed as part of the folder scan, playlist scan (if referenced by playlists) and by the iTunes scan.  If you turn on the following debugging options, you can watch this more closely for possible hints as to when it creates the duplicate:

d_info, d_itunes, d_import

If you wish to attach the log to this report, please use "create a new attachement" above, as opposed to pasting the text.  It will keep it formatted properly so that we can read it.
Comment 4 Ben Gladstone 2006-01-25 08:52:41 UTC
i'm seeing the same thing in 6.5b1

the bug duplicates 
- tracks that have an apostrophe in the track name
- all tracks within an album with an ampersand in the album name
- all tracks within an album with an apostrophe in the album name (note that tracks with an apostrophe, in an album with an apostrophe, appear only twice - not more times)

the id number of one of each pair of duplicate tracks due to ampersands is very high, close to the total number of tracks in the library, suggesting that a final phase in the scan is creating these duplicates. apostrophes appear to be created earlier in the scan.
Comment 5 Ben Gladstone 2006-01-25 11:24:15 UTC
Created attachment 1112 [details]
debug trace of duplicate tracks during a scan
Comment 6 Ben Gladstone 2006-01-25 11:24:27 UTC
i've done a test scan on a small library. this problem occurs only when you have itunes specified AND you also set Server Settings > Music Folder to the location of the music files (against the rubric's suggestion to leave it blank)

tracks with apostrophes in the track name are duplicated:
- first an iTunes scan gets them (line 208 in the attached)
- then another scan gets the same track (line 1142)
note that at line 1141 the second scan doesn't add the preceding track as it recognises a duplicate. The apostrophe appears to be the problem.

for apostrophes in the album name:
- first itunes scan gets them e.g. line 352
- then another scan at line 730
- track is recognised as duplicate at 1004

this test didn't reproduce the ampersand case
Comment 7 Ben Gladstone 2006-01-25 11:30:52 UTC
the reason for having both itunes and a music folder specified was so that i could add new music to slimserver without having to do a "scan for new music" which takes hours... (large library, 400MHz server)
Comment 8 Dan Sully 2006-04-20 17:30:49 UTC
Is this still an issue with the latest 6.2.2 nightly?

Thanks
Comment 9 Dan Sully 2006-04-24 13:42:41 UTC
I've tried multiple times to reproduce this with the latest 6.2.2 nightly. I think I fixed this about a month ago by resolving filenames to canonical case & paths.

Please reopen if you can reproduce with the latest 6.2.2 nightly.

Thanks.