Problem With iTunes 12 Delete Duplicate Items, iTunes Music Library.itl and iTunes Music Library.xml Finally Resolved
I know this is an old thread however it was at the top of the list when I searched for "iTunes not creating XML", earlier this week. There were a lot of great contributions to this thread by various authors over the years that helped me narrow down my specific problem, but since we are now working on iTunes 12.2 currently I suspect a couple things have changed within the program in the years between this entry and the one before it.
First of all, I am a professional DJ and have been using iTunes to prepare my music for my events before using other software, specifically Serato Scratch Live, for years now. I bought a brand new MacBook Pro in September of 2014 with a 1TB internal flash hard drive intending to consolidate my library, which had been previously divided between my old computer and my old external optical hard drive, onto my new computer's internal hard drive. This was a pretty simple and straight-forward process until recently. Since upgrading to iTunes 12, I have endured and finally resolved the two following, extremely staggering problems:
1. Deleting Items and Duplicate Items
Since bringing home my new MBP in September and up until upgrading to iTunes 12, I could delete duplicate items in iTunes 10 and 11 without pause, but the first thing I noticed when using iTunes 12 was that attempting to delete items and duplicate items would cause iTunes to freeze for sometimes over 10 minutes while the program worked out how to remove the items I had commanded it to delete. Eventually the program would execute this command and become responsive again, but not before losing sometimes several frustrating hours in one session to the Pinwheel of Death. After spending two full days on the phone with various Apple tech support reps at various call centers and with varying levels of familiarity with iTunes this week, ultimately no one could identify exactly what my problem was. I did notice last night while on the phone with a senior support rep though that when I set my iTunes window to "Song View" in "My Music", I could now suddenly delete items instantaneously again for some reason. The senior support rep believed that this was because iTunes accesses your song files directly in this view, but she suspected song files are accessed over extended pathways in all other screen views; especially in "Playlist View". Who knows for sure, but here are those steps broken down:
- Hit the "My Music" button in the top-center of your iTunes screen, just under the play bar.
- Hit the drop down menu in the top-right of your iTunes screen, just under the "Search" text field, and select "Songs"
- Try highlighting and deleting a duplicate item; hopefully it deletes instantaneously for you the same way it does for me.
2. XML File not Updating or Generating
Yeah, this one is a huge pain for anyone who has ever trusted iTunes to cooperate with any other music program. At first I thought that this was another widespread glitch with iTunes 12, however after spending the last couple days trying all of the other fixes offered in this thread, and in other threads from many other web searches, I eventually confirmed that this problem, for me, was indeed caused by one or more uncooperative non-Latin-based text characters in one or several of my songs' ID3 tags. I had tried the fix where you pull your xml file to the desktop and hope that iTunes creates another one in it's place from the itl file, but that didn't work for me. I then tried the method where you try to export a playlist of half of your library, or one letter of artists at a time, to try to narrow down where the problematic file was, but I was unexpectedly able to complete those tasks successfully as well as ultimately export my entire library to xml, so not only did I think that the problem was something else entirely at that point, but now I wonder if iTunes 12 is actually able to create xml files from playlists and libraries containing uncooperative non-Latin-based text characters so long as you manually tell it to do so, because that function still worked for me. Like, maybe this bug has been halfway fixed with iTunes 12 perhaps? But again, who knows for sure.
I should also point out that since I have a huge library that I have been building for years, and not always with iTunes-formatted music, I am aware that some of my music files here and there have all the ID3 info in one field, have no artwork, have limited ID3 info, etc. as is common with music files that are 10 plus years old, originally formatted with old Windows software or originally downloaded from Limewire over some no-longer-existent third party software, as just a few of the many examples of how music files can collect random, usually completely unrelated ID3 info. Believe me, cleaning up my library has been a gradual process.
Anyway, I believe I read somewhere else in this thread that if you highlight your entire song list, then hit "Command-I" for information, even if you don't actually want to change anything- which you definitely shouldn't, it will cause iTunes to quickly re-analyze the pathways to all the items in your library, revealing lost songs by marking them with an exclamation point in the far left column. I did that, then began going down my list of songs either deleting or reopening everything with an exclamation point next to it. Because I had my song list sorted by artist, I discovered a bunch foreign artists following all artists at the end of the English alphabet in my library as iTunes apparently sorts items labeled in foreign alphabets between items labeled in English, or Latin-based alphabets, and Numbers. Going through every item in this section of my library took a while, but because I didn't want to just delete all of these foreign albums and artists that I have collected over the years, I decided to copy/paste all the ID3 info into and out of an online text translator, which effectively removed all of the Hebrew, Russian, Japanese, Chinese, etc. characters from all of my foreign albums. At some point along the way I must've deleted the problematic text character or characters because iTunes did recreate the xml file during that process... After five days of troubleshooting, finally, what a relief. So first a couple of quick things to check and then those steps again:
Details to Check First
- In Finder, make sure your iTunes ITL file is named "iTunes Music Library.itl" exactly. (You should find this file at ~/Music/iTunes/iTunes Music Library.itl). Your "iTunes Music Library.itl" file is designed to automatically generate a coinciding XML file with the exact same title, or "iTunes Music Library.xml". "iTunes Music Library.xml" is THE EXACT FILE that all other iTunes-compatible music software is made to look for within your iTunes folder to read your iTunes Library, such as with Serato Scratch Live. I can't remember if iTunes 12 changed the ITL file from "iTunes Music Library.itl" to "iTunes Library.itl" or something like that since I was unaware of the importance this detail until after a couple days of troubleshooting, but I seem to remember that it wasn't specifically "iTunes Music Library.itl" for some reason.
- As someone noted somewhere previously in this thread, check your "Downloads" file found inside your "iTunes Music" folder, (~/Music/iTunes Music/Downloads) for any frozen downloads. Someone discovered that a partially downloaded video file caused their ITL file to not generate the coinciding XML file. I did find a frozen, partially downloaded video in my downloads folder, however that alone did not solve my problem. So onto the next thing I went.
Redirect and/or Delete Lost Items
In iTunes, hit the "My Music" button in the top-center of your iTunes screen, just under the play bar.
Next, hit the drop down menu in the top-right of your iTunes screen, just under the "Search" text field, and select "Songs"
Sort your Song List by Artist
Highlight your entire song library and hit "Command-I" for Information.
When iTunes asks "Are you sure you want to edit information for multiple items?", hit cancel and iTunes should mark any lost items with an exclamation point.Go through your whole song list and either redirect or delete your lost items as you prefer.
Delete or Translate Any Non-Latin-Based ID3 Info You Find in Any Non-iTunes Formatted Items
- Two-finger click, or 'right click', your Song List header bar, where it says Name, Time, Artist, Album, Genre, etc.
- Make sure categories such as Album Artist and Comments are checked. Feel free to check any other or all other categories you'd like.
- Even though Comments are usually not checked, you'll likely find that this is where someone, somewhere added problematic, non-Latin-based text.
- Resort your Song List by all of the categories you checked to consolidate all songs with info in those fields together.
- Delete or Translate any non-Latin-based text in in those fields.
- Scroll to the end of Z while your Song List is sorted by Artist, Song, Album, and other common categories, to see any non-Latin-based ID3 info.
- Delete or Translate any non-Latin-based text in your Song List's ID3 information.
It took me all week this week, but I pulled through just in time for my events this weekend. Many thanks to everyone who authored entries in this thread and in all the threads I consulted for fixes and ideas. Hopefully this entry will be the last one you end up having to read on this ridiculous problem.
And now I'm gonna drink and forget this whole thing ever, ever happened.
B