Bug 3335 - Latest release not seeing entire ITunes library
: Latest release not seeing entire ITunes library
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: iTunes
: 6.2.2
: PC Windows XP
: P2 major (vote)
: ---
Assigned To: Chris Owens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-27 16:07 UTC by Paul Wisneskey
Modified: 2008-09-15 14:38 UTC (History)
5 users (show)

See Also:
Category: ---


Attachments
Scan with d_itunes, d_itunes_verbose, and d_scan enabled (120.67 KB, text/plain)
2006-06-12 17:28 UTC, Paul Wisneskey
Details
Log from latest nightly with music folder location set. (100.00 KB, text/plain)
2006-06-12 19:49 UTC, Paul Wisneskey
Details
6.3 iTunes.pm with additional debug line (28.99 KB, text/plain)
2006-06-13 09:43 UTC, Andy Grundman
Details
Scan using custom iTunes.pm (106.46 KB, text/plain)
2006-06-14 14:39 UTC, Paul Wisneskey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Wisneskey 2006-04-27 16:07:11 UTC
When updated to today's latest release, my slimserver now longer sees all the tracks in my ITunes library.  The previous release version that I was running until today had no problems.  I have 15443 items according to ITunes in around (1300 albums).  However, Slimserver is telling me "Your music library contains 62 albums with 297 songs by 32 artists."  I have tried wiped everything and rescanning my library several times to no effect (still reports the same totals and same tracks).  Interestingly enough, it is finding one or two songs out of an album and not finding the others.  

Uninstalling 6.2.2 and re-installing 6.2.1 fixes the problem.  The previous release properly sees all of my music in ITunes.

If I turn on d_itunes, 6.2.1 properly reports all of my files whereas 6.2.2 is looking in the wrong place:

2006-04-27 18:04:17.6877 iTunes: file not found: C:\Documents and Settings\Paul\My Documents\My Music\iTunes\iTunes Music\Keller Williams\2005-03-01 Liberty hall - Lawrence,KS\05 Under pressure.mp3
2006-04-27 18:04:17.6922 iTunes: file not found: C:\Documents and Settings\Paul\My Documents\My Music\iTunes\iTunes Music\Keller Williams\2005-03-01 Liberty hall - Lawrence,KS\06 Crater in the backyard.mp3

The correct path to these files is different and is properly determined by 6.2.1
Comment 1 Paul Wisneskey 2006-04-28 06:37:46 UTC
For reference, here is some of the logging from a functioning database reload using 6.2.1:

2006-04-28 08:35:11.9769 iTunes: got a track named Bargeld location: file:////REPOSITORY/music/Library/Kmfdm/Money/04%20Bargeld.mp3
2006-04-28 08:35:12.1623 iTunes: got a track named Vogue location: file:////REPOSITORY/music/Library/Kmfdm/Money/02%20Vogue.mp3
2006-04-28 08:35:12.3593 iTunes: got a track named Under Satan - (Dub) location: file:////REPOSITORY/music/Library/Kmfdm/Money/09%20Under%20Satan%20-%20(Dub).mp3
2006-04-28 08:35:12.5458 iTunes: got a track named Money location: file:////REPOSITORY/music/Library/Kmfdm/Money/01%20Money.mp3
2006-04-28 08:35:12.7372 iTunes: got a track named Money - (Deutschmark Mix) location: file:////REPOSITORY/music/Library/Kmfdm/Money/11%20Money%20-%20(Deutschmark%20Mix).mp3
2006-04-28 08:35:12.9218 iTunes: got a track named Spiritual House location: file:////REPOSITORY/music/Library/Kmfdm/Money/05%20Spiritual%20House.mp3

Note that the only difference between the two runs was the Slimserver version.  I made sure that in both cases the service was set up to run under my account which has access to the REPOSITORY network share (a LinkSys NSLU2).

Comment 2 Michael Herger 2006-04-30 03:04:15 UTC
Is your collection spread across different drives/partitions?
Comment 3 Martin Arand 2006-04-30 07:53:20 UTC
I�ve the same problems with iTunes.
My collection is spread across different partitions.
Slim Server only shows the songs on the second partition.
With Slim Server 6.2.1 it shows all songs.
Comment 4 Paul Wisneskey 2006-04-30 10:31:41 UTC
All of my music is on one remote partition.  However, ITunes has been downloading podcasts to a local directory.  Interestingly enough, the few tracks it is finding seem to be on both the local directory and the remote network share.
Comment 5 KDF 2006-04-30 12:09:00 UTC
If the files are on a remote drive, please make sure that slimserver is still set up to run as a user.  It is a known issue that the installer will reset the service to run with only service permissions.  This may block access to remote mapped drives.  

http://wiki.slimdevices.com/index.cgi?BeginnersGuideToiTunes
Comment 6 Paul Wisneskey 2006-04-30 12:14:57 UTC
(In reply to comment #5)
> If the files are on a remote drive, please make sure that slimserver is still
> set up to run as a user.  It is a known issue that the installer will reset the
> service to run with only service permissions.  This may block access to remote
> mapped drives.  
> 
> http://wiki.slimdevices.com/index.cgi?BeginnersGuideToiTunes
> 

Yes, I've done that.  From my second comment:

"Note that the only difference between the two runs was the Slimserver version. 
I made sure that in both cases the service was set up to run under my account
which has access to the REPOSITORY network share (a LinkSys NSLU2)."

And I still want to point out, it is seeing a few of my songs in a couple of albums and able to play them.  So it definitely has access to the share.
Comment 7 KDF 2006-05-02 11:04:47 UTC
please run an entire scan (clear library) using --d_itunes and attach the log file.  To shorten the file a bit, you can cut off after the scan has gone through at least a few of the "not found" files. Please use the "create new attachment" link above, instead of pasting as a comment so that line wrapping wont get in the way. thanks.
Comment 8 Paul Wisneskey 2006-05-05 15:24:52 UTC
I will do that as soon as I possibly can.  Unfortunately, I'm away from my home for the next few weeks awaiting the birth of my second kid (long story but basically we live in New Orleans and there aren't many birthing options there post Katrina).  So realistically, I won't be back to my house (in order to run the scan) until mid to late May.
Comment 9 Paul Wisneskey 2006-05-23 21:16:29 UTC
Just an update so that everyone knows I have not forgotten about this.  I had to cancel a trip back home thanks to some work conflicts so I have not had a chance to try it with my slimserver yet.  It's now looking like the earliest I'll be back home is June 10th.  Sorry for the delay and I'll run the tests as soon as I possibly can.
Comment 10 Chris Owens 2006-06-12 14:18:57 UTC
Any update on this?  I can't reproduce this on the latest 6.3, but if you are still having problems, it's a serious-enough bug that it needs to get fixed before we release.

Thanks for any update.
Comment 11 Paul Wisneskey 2006-06-12 17:28:58 UTC
Created attachment 1259 [details]
Scan with d_itunes, d_itunes_verbose, and d_scan enabled

Here is a scan of the latest release version which is still failing to read my library.  Lots of file not found as it somehow normalizes my music file names to be on my local computer when in reality they are all on a server (\\REPOSITORY).  All of the files that are not found, do exist on the server and the older release version has no problem loading any of them.

I apologize it took me so long to get this; I am back home now and am willing try to whatever else you all need to troubleshoot this.
Comment 12 Andy Grundman 2006-06-12 17:37:30 UTC
Can you try it with the latest 6.3 nightly?
Comment 13 Paul Wisneskey 2006-06-12 18:37:01 UTC
It is still failing with today's nightly build.  I've done some more digging and things are really wierd.  For example, I went and looked at my "iTunes Music Library.xml" file and looked for a track that SlimServer considers to be in the wrong place.  To my surprise, the track in the XML file is listed in the wrong place there as well (i.e. the value of the location element is what SlimServer is using).

So I started iTunes and found the track in my library.  When I look at the track properties, it shows the file as being in the correct location on //REPOSITORY.  So I have no idea why there are bad locations in my iTunes XML file but iTunes itself shows the file in the real location (and can play it fine).

And don't forget, the previous release version of SlimServer loads everything without problems.  In fact, the number of tracks loaded with this latest one is even less than normal.  It's about half of what the current release is finding.

I'm going to download and re-install iTunes and see if that fixes anything.
Comment 14 Andy Grundman 2006-06-12 18:39:36 UTC
Would you mind attaching both your iTunes XML file and your slimserver.pref file?
Comment 15 Paul Wisneskey 2006-06-12 18:48:38 UTC
Eureka!  I know what is going on...

With the latest release and ongoing versions, if the music folder is set in the server config, it is somehow pushed into the iTunes Music Library.xml and causes the paths to most of the tracks to be incorrect.  When I cleared that folder setting, all of my iTunes library was properly loaded.  The previous release version that was working for me apparently just ignored the music folder setting and used the correct iTunes library location.   
Comment 16 Paul Wisneskey 2006-06-12 18:50:21 UTC
Andy, let me know if you still want my library XML and prefs file.  However, I suspect you'll be able to duplicate the problem on your own now.
Comment 17 Andy Grundman 2006-06-12 18:58:26 UTC
Right, in 6.2.2 there was a bug with iTunes Music Folder setting, as well as the Windows installer which set a default value for that setting which should have been left blank.  In 6.3, if the file isn't found in the Music Folder path, it will fall back to whatever is in the XML file.  So if that was your problem, I'm surprised it didn't work with a 6.3 nightly.  If you don't mind, could you add a short log from 6.3 with the music folder setting enabled, where it was still not finding your files?

Glad you got it working. :)
Comment 18 Paul Wisneskey 2006-06-12 19:42:46 UTC
Ok, I put back in a music folder location and it appears that the latest release is just loading the few tracks that are in that directory and ignoring the iTunes XML file.  This explains why the number of tracks it was getting was different that the latest release.  However, if I change the iTunes music folder from My Music to My Music/ITunes it then does process the iTunes XML file (just like it does if I leave the music folder blank).

So I think that maybe the prior release knew to look in the iTunes folder whereas the current nightly needs to be pointed right at it if its set.
Comment 19 Paul Wisneskey 2006-06-12 19:43:56 UTC
(In reply to comment #18)
> different that the latest release.  However, if I change the iTunes music
> folder from My Music to My Music/ITunes it then does process the iTunes XML
> file (just like it does if I leave the music folder blank).

Oops, this should be "...if I change the music folder..." - i.e. not the iTunes music folder.

- Paul

Comment 20 Paul Wisneskey 2006-06-12 19:49:27 UTC
Created attachment 1260 [details]
Log from latest nightly with music folder location set.

Argh, it looks like I spoke too soon.  If I put back in a music folder of C:\Documents and Settings\Paul\My Documents\My Music\iTunes, it is back to only loading a few files from my network share.    Now its saying:

Your music library contains 66 albums with 307 songs by 69 artists.

This is close to what the latest release was saying and small difference in counts is probably attributable to some podcasts I downloaded while I was away from my network share (i.e. they are stored in my local music folder).

So something is still going on that is causing only part of my iTunes library to be loaded if I have a music folder defined.  Clearing the music folder fixes things for me so I have a workaround, but I'm willing to keep troubleshooting this if you think its worth your time.

I just wish I lived near you guys so you all could look over my should.  If we get really desperate, I could try to set up a webcam and get on a conference call as I walk through things.
Comment 21 Paul Wisneskey 2006-06-12 19:51:21 UTC
Hmmm....upon further digging, I think the few tracks from my network share that are getting pulled in are the ones that are in playlists stored locally on my box.  If this is the case, it means the slimserver is ignoring my iTunes folder if I have a local music directory defined.  The log I attached above seems to support this.
Comment 22 Andy Grundman 2006-06-13 09:43:38 UTC
Created attachment 1261 [details]
6.3 iTunes.pm with additional debug line

Is that a full d_itunes + d_itunes_verbose log file?  It seems to be missing the "normalized" lines.  

I did a bit more debugging and found that iTunes Music Folder setting is only used for files that exist in the iTunes default music folder (the "Music Folder" XML key near the top of the XML file).  Any paths outside of this, like your REPOSITORY paths, won't be affected by that setting at all.

Can you make a new log using d_itunes and d_itunes_verbose, and drop in the attached iTunes.pm file?  It contains an additional debug line.
Comment 23 Andy Grundman 2006-06-14 14:08:25 UTC
Paul, can you post an updated log file, or should we consider this bug as fixed?
Comment 24 Paul Wisneskey 2006-06-14 14:19:51 UTC
Sorry....5 week old baby was not cooperating last night.  I should be able to get a log file tonight.
Comment 25 Paul Wisneskey 2006-06-14 14:39:00 UTC
Created attachment 1262 [details]
Scan using custom iTunes.pm

This is a scan with d_ituns, d_itunes_verbose, and d_scan enabled.  My music folder was set to "C:\Documents and Settings\Paul\My Documents\My Music".  If I'm reading the logging correctly, it appears that things are being loaded properly - i.e. its trying my local music folder and when it gets file now found, it just uses the iTunes location.   

I'm assuming that all I needed to do was replace the iTunes.pm with the one attached to this bug report.  Since I'm running on windows, I wasn't sure if it was getting a precompiled version.  If that is the case, let me know what I need to do to run the source.
Comment 26 Andy Grundman 2006-06-14 14:45:15 UTC
Log looks good, so everything is working for you now?
Comment 27 Paul Wisneskey 2006-06-14 14:50:29 UTC
Yep, seems to be good now.  So I guess the final resolution is that this was a bug in the last release related to me having a music directory set.  It definitely is fixed in the latest stuff.  Thanks for the patience of waiting for me to get back to troubleshoot this one.  :-)
Comment 28 Chris Owens 2006-06-16 11:31:29 UTC
Verified fixed in SlimServer Version: 6.3.0 - 8002 - Windows XP - EN - cp1252
Comment 29 Chris Owens 2006-06-27 14:21:10 UTC
This bug fix is now part of a released version, and so has been marked closed. If you are still experiencing this problem, please reopen the bug.