Bugzilla – Bug 2309
New Version of iTunes Breaks SlimServer
Last modified: 2008-09-15 14:37:04 UTC
I've been using the iTunes integration with SlimServer for many months without any problems, however, after installing the new iTunes 6, SlimServer is quite unhappy. SlimServer 6.1.1 crashes upon rescan. The latest beta (2005-10-17) seems reasonably stable but doesn't parse playlists from the iTunes file. I suspect that Apple changed the format of the XML library file to support the new playlist folders feature. If you're not aware of this, or believe this problem is local to my system, let me know and I'll provide further details.
Please try 6.2 nightly builds, as no more fixing is being done based on 6.1.1
I also should mention that 6.2 has a completely rewritten parser for iTunes, so its not just a version number :)
I'm currently running tonight's 6.2b1. This version will parse the iTunes library without crashing, but it doesn't extract any of the playlists. Is this expected behavior?
that is not expected behavior. what are your settings under Server Settings in the web interface? Is iTunes turned on?
iTunes is turned on and is using the same setup that worked okay with pre-iTunes 6 versions. I'll attach a copy of the prefs file this evening.
I'm not seeing this. After upgrading, I still have playlists. This pay be another case of bug1278. As for the new XML, it seems they track ID's get rekeyed, plus a few new keys are added to each track: Season PersistentID Podcast The first two should simply be ignored by slimserver, third will also be ignored, but we could actually make use of it.
Matt, also please attach your iTunes Music Library.xml file. Thanks.
Created attachment 920 [details] Test case library that causes my SlimServer to hang in an infinite loop.
I did some digging this evening and found the following: 1. After starting a full rescan, the iTunes parser appears to get stuck in an infinite loop. Turning on --d_itunes and --d_itunes_verbose displays a never ending stream of "2005-10-18 22:17:22.3256 iTunes: Parsing next bit of XML..." The web interface says that "SlimServer is still scanning..." This message never goes away. 2. Looking at the debug messages led me to determine that the path to my iTunes music library (as specified in the Server Settings / iTunes area) was incorrect. Once I fixed this, my iTunes playlists came back. Problem solved! (Not sure why this didn't break previous versions, but oh well...) 3. Protected AAC files (i.e., songs purchased from the Music Store) appear as null strings inside iTunes' generated playlists. IMHO, these should be treated as disabled or missing songs rather than mysterious blank entries. I've attached a copy of a very small test case library that causes the parser to get stuck in a loop. Perhaps you'll want to close this bug and -- if you think they're real -- open new bugs for the infinite loop and null string issues.
Matt - I'm unable to reproduce with your iTunes XML file. Any other thoughts on what's happening? Can you run with --d_import as well?
Hmm... I'm not sure what's going on. Not that I think it matters, but I'm running Perl 5.8.0. (perl --version = "This is perl, v5.8.0 built for i386-linux-thread-multi") I tried using the --d_import option as you requested. It produced the following output: (I eventually killed the process after letting it run 30 minutes or so) [root@www SlimServer_v2005-10-17]# ./slimserver.pl --d_import 2005-10-19 20:48:43.6498 Import: Adding Folder Scan 2005-10-19 20:48:43.6504 Import: Adding Playlist Scan 2005-10-19 20:48:44.4062 Import: Adding iTunes Scan 2005-10-19 20:50:24.6928 Import: Wiped all in-memory caches. 2005-10-19 20:50:26.4123 Import: Wiped all in-memory caches. 2005-10-19 20:50:27.4339 Import: Wiped info database 2005-10-19 20:50:27.4885 Import: Starting iTunes scan 2005-10-19 20:50:27.4898 Import: Starting Playlist scan 2005-10-19 20:50:37.0961 Import: Scanning with 2 import plugins 2005-10-19 20:50:37.0966 Playlist scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 20:50:37.0967 iTunes scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 20:50:37.0969 2005-10-19 20:52:54.0230 Import: Scanning with 2 import plugins 2005-10-19 20:52:54.0234 Playlist scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 20:52:54.0236 iTunes scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 20:52:54.0238 2005-10-19 20:53:13.9927 Import: Wiped all in-memory caches. 2005-10-19 20:53:14.6178 Import: Scanning with 2 import plugins 2005-10-19 20:53:14.6183 Playlist scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 20:53:14.6185 iTunes scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 20:53:14.6186 2005-10-19 20:53:16.0256 Import: Scanning with 2 import plugins 2005-10-19 20:53:16.0261 Playlist scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 20:53:16.0263 iTunes scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 20:53:16.0264 2005-10-19 20:53:18.9616 Import: Scanning with 2 import plugins 2005-10-19 20:53:18.9621 Playlist scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 20:53:18.9623 iTunes scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 20:53:18.9624 2005-10-19 20:53:20.9804 Import: Completed Playlist Scan in 173 seconds. 2005-10-19 20:53:28.0088 Import: Scanning with 1 import plugins 2005-10-19 20:53:28.0093 iTunes scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 20:53:28.0095 2005-10-19 21:18:44.6218 Import: Scanning with 1 import plugins 2005-10-19 21:18:44.6426 iTunes scan started at: Wed Oct 19 20:50:27 2005 2005-10-19 21:18:44.6428 I'll attach my preferences file -- in case it's worth looking at. Unless you guys think of a more interesting experiment, tomorrow I'll try using a library created by iTunes for Windows (so far I've been testing only Mac-generated XML libraries). Not that it should matter...
Created attachment 924 [details] Preferences file used for test cases
Oh, one other thing... The directory that contains my music library contains an apostrophe character (MP3's). This is really dumb, I know (not to mention gramatically incorrect). I've been meaning to change this but haven't gotten around to it. Perhaps the parser is choking on that single-quote. I know some Unix tools get their panties in a bunch when they come across files and directories whose names contain escaped characters. I'll try fixing that tomorrow.
No luck this evening. I tried using an iTunes library created from the Windows' version of the program and I changed the name of the music folder such that it no longer contains a single-quote. Despite this, SlimServer still hangs in an infinite loop when rescanning the library. Any suggestions?
Matt - what happens if you have just one song in your library?
Even with just one song, it still gets stuck.
Ok - can you upload that library, that song, iTunes & OSX version info to this bug? Thanks.
Created attachment 931 [details] Single-song test case library
Created attachment 932 [details] MP3 referenced in single-song library
I've attached a copy of the single-song library and the actual MP3 file referenced by it. I'm actually using iTunes for Windows to create these test cases (I was previously using MacOS X, but the results were the same). iTunes for Windows, version 6.0.1.3. Microsoft Windows XP Home Edition OS Version 5.1.2600 OS Service Pack Service Pack 2
Still unable to reproduce here - scanning is fine. Matt - have you changed any of the configs under Settings -> iTunes? Or is your iTunes.xml file in a non-standard place? 2005-10-24 11:08:35.1660 iTunes: Resetting scan state. 2005-10-24 11:08:35.1678 iTunes: Attempting to get lock on iTunes Library XML file. 2005-10-24 11:08:35.1703 iTunes: Got file lock on iTunes Library 2005-10-24 11:08:35.1724 iTunes: Created a new Non-blocking XML parser. 2005-10-24 11:08:35.1944 iTunes: Parsing next bit of XML.. 2005-10-24 11:08:35.2267 iTunes: found the music folder: file://localhost/Users/dsully/MP3s 2005-10-24 11:08:35.2296 iTunes: starting track parsing 2005-10-24 11:08:35.2348 iTunes: got a track named Crazy location: file:///Users/dsully/MP3s/ Alanis%20Morissette/Unknown%20Album/Crazy.mp3 2005-10-24 11:08:36.0768 Import: Wiped all in-memory caches. 2005-10-24 11:08:36.5996 iTunes: starting playlist parsing, cleared old playlists 2005-10-24 11:08:36.6153 iTunes: Parsing next bit of XML.. 2005-10-24 11:08:36.6545 iTunes: got a playlist array of 21 items 2005-10-24 11:08:36.6564 iTunes: got a playlist (itunesplaylist:Party%20Shuffle) named Party Shuffle 2005-10-24 11:08:37.3441 iTunes: playlists now has 21 items... 2005-10-24 11:08:37.3484 iTunes: Finished scanning iTunes XML 2005-10-24 11:08:37.3509 iTunes: done Scanning: unlocking and closing 2005-10-24 11:08:37.3920 iTunes: attempting to locate iTunes Music Library.xml 2005-10-24 11:08:37.3946 iTunes: found path via directory search at: /Users/dsully/Music/iTunes/ iTunes Music Library.xml 2005-10-24 11:08:37.4004 iTunes: scan completed in 3 seconds. 2005-10-24 11:08:37.4038 Import: Completed iTunes Scan in 2 seconds. 2005-10-24 11:08:37.4171 Import: Scanning with 1 import plugins 2005-10-24 11:08:37.4191 Playlist scan started at: Mon Oct 24 11:08:34 2005 2005-10-24 11:08:37.4210 2005-10-24 11:08:38.3518 Import: Completed Playlist Scan in 3 seconds. 2005-10-24 11:08:38.3542 Adding task for artScan(). 2005-10-24 11:08:38.3562 Adding task for mergeVariousArtistsAlbums(). 2005-10-24 11:08:38.3579 Import: Finished background scanning. 2005-10-24 11:08:38.9176 Import: Completed Artwork Scan in 0 seconds. 2005-10-24 11:08:39.4630 Import: Finished with mergeVariousArtistsAlbums()
Yes, on both accounts: 1. In iTunes setup, I've changed the music library location so that my MP3 files reside on my server rather than locally in the user's home directory. 2. So that SlimServer (running on the server) can see my Library.xml file, I save a copy of it (via "Export Music Library...") to a location visible by the RedHat machine.
Ok - so SlimServer itself is running on a RedHat box? Would it be possible to get ssh access into that machine? Thanks.
I downloaded and installed the 6.2 release version of Slim. Same behavior. Then I tried upgrading my Perl installation from 5.8.0 to 5.8.3 (as was highly recommended in the documentation). After installing Perl, SlimServer asked me to run a script to download and install some additional modules, which I did. Everything works fine now. Looks like whatever my problem was, it was related to my old Perl environment. At this point, I'm satisfied with how things are working. If you're interested in investigating this further, I can look into getting you an SSH login, otherwise we can close this bug. Thanks for your assistance -- Matt
Ok, thanks Matt. Doesn't sound like anything I can fix.