|Nov 14, 2008, 12:37 PM||#1|
iTunes won't restore all files from iTunes Music Library.xml
I had to move around my files recently so needed to change the location iTunes looked for them. I ran across a hack whereby you edit the iTunes Music Library.xml file and then intentionally corrupt the iTunes Library.itl file so that it reimports the next time you restart iTunes (I'm sure many of you may already be familiar with this hack).
It almost works.
Problem is that it doesn't import all my files. I have over 10000 files but it only imports 6445 of them. I noticed that the original xml filesize is 16MB. After importing, it gets chopped down to 10MB. What the heck is happening here?
|Nov 15, 2008, 09:28 AM||#2|
The plot thickens...
So I decided to try a different approach to my problem and here's how it went. First I deleted the xml and itl files in iTunes directory and fired it up. Basically, I'm working w/ a blank slate. I then went to File -> Library -> Import Playlist and selected the amended xml file. After churning along a bit, it spat out an error: The file "library.xml" cannot be imported. An unknown error occurred (-50).
So that's something I have to work off at least.
|Nov 15, 2008, 11:54 AM||#3|
Finally, fixed this - posted in case anybody runs across the same issue. The import process was obviously bugging out on the import of one file, so all I basically did was remove the offending entry from the xml file. Figuring out which file to remove though was the only mildly tricky part. Here's how I did it.
Open your xml file and notice that the files are simply a bunch of 'key' tags followed by a 'dict' tag. The 'key' tag holds a number while the 'dict' tag encapsulates the actual metadata. The 'key' tag will be helpful for our purposes since as far as I can tell, it increments sequentially for each file. My 'key' tags started incrementing from 1316 - dunno why. Since I was only importing 6445 files before bugging out, I searched for the file corresponding to key 7761 (6445+1316).This got me real close to the bad file so from here it was only a matter of figuring out which file did not successfully import by comparing the xml file to iTunes. For me it was the file corresponding to key 7764. Anyway, I deleted the key and dict entry for key 7764, saved, reimported my library, and now all is fine.
As an aside, after restoring my library, I then went to import the single problematic file manually w/o any problem so although the issue is fixed, it's cause is still a mystery.
|Sep 8, 2011, 10:30 AM||#5|
I had a different problem, but importing from the .xml file turned to be the solution. Then I came to this issue where I received this error message. I opened up the .xml file, followed your instructions for reading it and found the issue within the file. The file was missing in the library, but was reporting garbage text in the .xml file. I had access to export the library file again and it imported perfectly. Thanks for posting the solution.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|itunes moved and/or copied tons of music files, ruined my library. how can i reverse?||ttppmm||Mac Applications and Mac App Store||1||Sep 12, 2013 10:37 AM|
|iTunes can't play music from moved iTunes library (in TM backup)||Cougarcat||Mac Applications and Mac App Store||0||Aug 17, 2013 03:27 PM|
|iTunes music library.XML not updating???||Bronze84||Mac Applications and Mac App Store||1||Nov 1, 2012 05:38 AM|
|iTunes Music Library XML Problem||dominickvaris||OS X||0||Aug 10, 2012 12:44 AM|
|iTunes Match Files or copy Itunes Music Folder||nortyhat||OS X 10.8 Mountain Lion||0||Jul 26, 2012 03:56 PM|
All times are GMT -5. The time now is 01:58 AM.