Bugzilla – Bug 5217
First file in iTunes library is not scanned into SlimServer
Last modified: 2008-12-18 11:12:53 UTC
Wierd bug that the file that is the first in my iTunes library file cannot be found by SlimServer. The same file/library works file in 6.5 I do not know if it's because it's the first file but seems possible? Scanner log: [13:34:01.8133] Slim::Music::Import::runImporter (443) Starting Slim::Plugin::iTunes::Importer scan [13:34:01.8147] Slim::Plugin::iTunes::Common::useiTunesLibrary (71) Using iTunes library: 1 [13:34:01.8171] Slim::Plugin::iTunes::Importer::startScan (148) Parsing file: C:\Documents and Settings\James\My Documents\My Music\iTunes\iTunes Music Library.xml [13:34:03.1501] Slim::Plugin::iTunes::Importer::handleCharElement (497) Found the music folder: file://localhost/E:/iTunes [13:34:03.1511] Slim::Plugin::iTunes::Importer::handleEndElement (559) Starting track parsing. [13:34:03.1608] Slim::Plugin::iTunes::Common::normalize_location (312) Normalized file://localhost/E:/The%20All%20Seeing%20I/Walk%20Like%20a%20Panther/01%20Walk%20Like%20a%20Panther%20%5B7%20inch%20Versi.mp3 to file:///E:/The%20All%20Seeing%20I/Walk%20Like%20a%20Panther/01%20Walk%20Like%20a%20Panther%20%5B7%20inch%20Versi.mp3 [13:34:03.3203] Slim::Plugin::iTunes::Importer::handleTrack (314) File not found: E:\The All Seeing I\Walk Like a Panther\01 Walk Like a Panther [7 inch Versi.mp3 That's the correct path, and the file does exist! And this is the start of the library XML: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Major Version</key><integer>1</integer> <key>Minor Version</key><integer>1</integer> <key>Application Version</key><string>7.2</string> <key>Features</key><integer>1</integer> <key>Show Content Ratings</key><true/> <key>Music Folder</key><string>file://localhost/E:/iTunes/</string> <key>Library Persistent ID</key><string>45E0F32E977E546B</string> <key>Tracks</key> <dict> <key>2131</key> <dict> <key>Track ID</key><integer>2131</integer> <key>Name</key><string>Walk Like a Panther [7 inch Version]</string> <key>Artist</key><string>The All Seeing I</string> <key>Album</key><string>Walk Like a Panther</string> <key>Genre</key><string>Pop</string> <key>Kind</key><string>MPEG audio file</string> <key>Size</key><integer>5749908</integer> <key>Total Time</key><integer>261485</integer> <key>Track Number</key><integer>1</integer> <key>Track Count</key><integer>2</integer> <key>Year</key><integer>1999</integer> <key>Date Modified</key><date>2007-01-07T09:32:52Z</date> <key>Date Added</key><date>2003-10-17T19:33:29Z</date> <key>Bit Rate</key><integer>175</integer> <key>Sample Rate</key><integer>44100</integer> <key>Play Count</key><integer>3</integer> <key>Play Date</key><integer>3205343872</integer> <key>Play Date UTC</key><date>2005-07-27T20:17:52Z</date> <key>Rating</key><integer>80</integer> <key>Sort Artist</key><string>All Seeing I</string> <key>Persistent ID</key><string>60F011B6395ACBBF</string> <key>Track Type</key><string>File</string> <key>Location</key><string>file://localhost/E:/The%20All%20Seeing%20I/Walk%20Like%20a%20Panther/01%20Walk%20Like%20a%20Panther%20%5B7%20inch%20Versi.mp3</string> <key>File Folder Count</key><integer>3</integer> <key>Library Folder Count</key><integer>1</integer> </dict>
not sure that this is an slimserver parsing issue. The test is if a file is readable and exists for that error. check the permissions as well to be sure. Might also be the [ character?
The same file scanned from the same library causes no issues in SlimServer 6.5.3, so it seems to me it must be a 7.0 issue? And the file is of course readable. (I'm going to try changing the first file in the library XML and see what happens)
I created a test iTunes library file with 4 music files - this gives the same error. Then I switched the order of the files - and the error still occurs on the 1st file in the library, and the one which had the error before is now fine: [21:25:14.7310] Slim::Plugin::iTunes::Importer::startScan (148) Parsing file: C:\Documents and Settings\James\My Documents\My Music\iTunes\Test.xml [21:25:14.7553] Slim::Plugin::iTunes::Importer::handleCharElement (497) Found the music folder: file://localhost/E:/iTunes [21:25:14.7563] Slim::Plugin::iTunes::Importer::handleEndElement (559) Starting track parsing. [21:25:14.7645] Slim::Plugin::iTunes::Common::normalize_location (312) Normalized file://localhost/E:/American%20Music%20Club/Keep%20Me%20Around/01%20Keep%20Me%20Around.mp3 to file:///E:/American%20Music%20Club/Keep%20Me%20Around/01%20Keep%20Me%20Around.mp3 [21:25:14.8520] Slim::Plugin::iTunes::Importer::handleTrack (314) File not found: E:\American Music Club\Keep Me Around\01 Keep Me Around.mp3 [21:25:14.8617] Slim::Plugin::iTunes::Common::normalize_location (312) Normalized file://localhost/E:/The%20All%20Seeing%20I/Walk%20Like%20a%20Panther/02%20Snake%20I%20%5BEdit%5D.mp3 to file:///E:/The%20All%20Seeing%20I/Walk%20Like%20a%20Panther/02%20Snake%20I%20%5BEdit%5D.mp3 [21:25:14.8649] Slim::Plugin::iTunes::Importer::handleTrack (331) Got a track named Snake I [Edit] location: file:///E:/The%20All%20Seeing%20I/Walk%20Like%20a%20Panther/02%20Snake%20I%20[Edit].mp3 [21:25:15.6416] Slim::Plugin::iTunes::Common::normalize_location (312) Normalized file://localhost/E:/iTunes/The%20All%20Seeing%20I/Walk%20Like%20a%20Panther/01%20Walk%20Like%20a%20Panther%20%5B7%20inch%20Versi.mp3 to file:///E:/iTunes/The%20All%20Seeing%20I/Walk%20Like%20a%20Panther/01%20Walk%20Like%20a%20Panther%20%5B7%20inch%20Versi.mp3 [21:25:15.6449] Slim::Plugin::iTunes::Importer::handleTrack (331) Got a track named Walk Like a Panther [7 inch Version] location: file:///E:/iTunes/The%20All%20Seeing%20I/Walk%20Like%20a%20Panther/01%20Walk%20Like%20a%20Panther%20[7%20inch%20Versi.mp3 [21:25:15.7848] Slim::Plugin::iTunes::Common::normalize_location (312) Normalized file://localhost/E:/American%20Music%20Club/Keep%20Me%20Around/02%20In%20My%20Role%20As%20The%20Most%20Hated%20Sing.mp3 to file:///E:/American%20Music%20Club/Keep%20Me%20Around/02%20In%20My%20Role%20As%20The%20Most%20Hated%20Sing.mp3
I found what appears to be the problem. At line 290: my $mtime = (stat($file))[9]; my $ctime = str2time($curTrack->{'Date Added'}); On the first iteration of the loop only, the str2time() call in the 2nd line appears to clear the '_' filehandle populated by stat() and used a little further down: # Reuse the stat from above. if (!$file || !-r _) { That test then fails because -r _ returns undef. Immediately after the stat() call it returns 1. If you swap the order of the 1st two lines, it works fine! (Or replace '!-r _' with '!-r $file') But I have no idea why str2time() would do this, in particular why is it happening only on the first track!? James
Thanks for looking in to this, James.
*** Bug 5855 has been marked as a duplicate of this bug. ***
Another log file attached to duplicate Bug 5855. Increasing severity and changing hardware, os, assignee and target milestone since the behavior happens on both Macs and PCs.
Fixed in change 14450.
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.