Go Back   The macosxhints Forums > OS X Help Requests > Applications



Reply
 
Thread Tools Rate Thread Display Modes
Old 01-28-2008, 10:20 AM   #1
el Charlot
Prospect
 
Join Date: May 2005
Posts: 6
How to recover broken iTunes links ?

Hi. When I installed Leopard, I made a backup of my iTunes library. When I imported it back, most of it was found, but some not. Very strangely, about 5000 songs were displayed with the "!" before them. The strange thing is that its most of the time from an artist that has other albums well retrieved. Like if I had 10 Bowie albums, 7 of them are correctly displayed, and I can listen to them, but 3 others are tagged with the "!" and said not to be found when I try to listen to them.

As far as I know, the only available sollution to recover them is to clic each one of them then link them back. But for 5000 songs, I just start to become crazy.

Anybody have a sollution to ease that ? I went on Doug's applescript page but didn't found anything that seems to work for me.

If you can help me, cause this drives me a little mad .
Cheers.
el Charlot is offline   Reply With Quote
Old 01-28-2008, 11:48 AM   #2
seeker777
Triple-A Player
 
Join Date: Apr 2007
Location: Royal Oak, MI U.S.A.
Posts: 201
Well, this is a bit clunky, but may solve your problem...

Go to Preferences>Advanced>General and make sure the "Copy files to iTunes Music Folder when adding to library" is not checked.

Try File>Add Folder to Library and select all the album folders needed (hold down Command Key / "Apple" key to select many at once).

This may create song duplicates in the Library, so go to View>Show Duplicates and delete the ones with "!" next to them. To make this process easier, go to View>View Options and make sure "Date Added" is checked. Then sort by Date Added. You can now select the group to delete by selecting the first in the group and holding down Shift while selecting the last one. Do not select moving the music file to the trash when deleting the entries from the library duplicates.

With 5,000 songs, selecting those album folders may still be too tedious, but this is all I can think of off the top of my head. Perhaps, bigger brains will prevail. Good luck.
seeker777 is offline   Reply With Quote
Old 01-28-2008, 12:55 PM   #3
EatsWithFingers
All Star
 
Join Date: Feb 2005
Posts: 726
Re-importing the tracks will cause you to lose meta-data such as number of times played, ratings, etc. (all the stuff which isn't embedded in the music files).

However, there is a way round it:
  1. Make a playlist in iTunes that contains all the tracks which cannot be found (I'm not sure if there is a quick way to do this)
  2. Export the playlist as an XML file (File -> Export... then save as XML)
  3. Edit the XML file so the paths to the tracks are correct (this is easier if some common prefix of the paths are wrong). The locations will be given by the string: "<key>Location</key><string>COMMON_PREFIX/UNIQUE_PATH</string>", so replace "<key>Location</key><string>INCORRECT_COMMON_PREFIX" with "<key>Location</key><string>CORRECT_COMMON_PREFIX"
  4. Import the modified XML file (File -> Import...)

This won't overwrite the old files, so you'll still have to delete them manually.
__________________
Question everything -- especially that which you already believe to be true.
EatsWithFingers is offline   Reply With Quote
Old 01-30-2008, 05:36 AM   #4
EatsWithFingers
All Star
 
Join Date: Feb 2005
Posts: 726
Exclamation My Previous Post is WRONG

Exporting the XML file, then re-importing it will keep some extra information like ratings, but it does not keep playcounts, last-played, imported-with, and possibly other stuff.
__________________
Question everything -- especially that which you already believe to be true.
EatsWithFingers is offline   Reply With Quote
Old 01-30-2008, 06:44 AM   #5
el Charlot
Prospect
 
Join Date: May 2005
Posts: 6
Damn, I want to preserve my extra informations. I started to use iTunes as my main music library 8 years ago, dont want to loose every ratings and stuff, and playcount is used in some of my playlists ...
Thanks for your responses, seems I have to do the xml thing if I dont want to do the song one by one ...
Silly I cant directly edit the library file, because I'd like to know how it cant find some albums, but find others from a similar artist that are in the same folder ...
el Charlot is offline   Reply With Quote
Old 01-31-2008, 05:26 AM   #6
seeker777
Triple-A Player
 
Join Date: Apr 2007
Location: Royal Oak, MI U.S.A.
Posts: 201
I thought a little bit more about how to simplify the process I suggested.

If you follow all of the steps I stated, but select the entire iTunes Music folder as opposed to individual albums, you can then proceed to the steps in showing and deleting the duplicates - which will simply include more songs - but the selection process at that step is faster than selecting individual albums.

As stated above by other folks, there may be consequences regarding losing some metadata. However, I will also tell you that for whatever reason, when my iTunes Library was messed up, working with the XML file did not fix my problem. So, try their suggestions first, but if their suggestions do not resolve your issue, this will accomplish solving your original problem.
seeker777 is offline   Reply With Quote
Old 01-31-2008, 04:17 PM   #7
EatsWithFingers
All Star
 
Join Date: Feb 2005
Posts: 726
Another Idea...

And this one doesn't require editing the XML file!

If you export a playlist that contains files with the ! marker, you should be able to see where iTunes thinks the files should be (by looking at the XML file). Obviously, you don't want to do this for all 5000 tracks, but it may provide a clue as to where the application is looking for the missing tracks. For example, if a couple of missing tracks have the same path to a common folder on an external drive, then there is a good chance that many more of the missing tracks will too.

Unfortunately, iTunes won't let you add missing tracks to regular playlists, only smart ones, so you may have to be creative to get an approprite playlist to export.

Then, if you move your missing tracks to where iTunes is looking for them you should be able to play them. This is good, but we're not finished yet. If moving individual tracks is too tedious, you can just copy the entire library - iTunes will only look there for the tracks it hasn't already found.

The next step is to make sure that the correct location for your music library is set in iTunes' preferences (under the 'general' tab of the 'advanced' pane).

Then just consolidate your library (Advanced -> Consolidate Library...). This will put a copy of every track in your library (that iTunes can find) into the correct location in your library folder.

All your metadata will remain, and all your music will be in the correct location.


And for the record, I really think iTunes should have a function (via Spotlight?) that searches for tracks it cannot find.
__________________
Question everything -- especially that which you already believe to be true.
EatsWithFingers is offline   Reply With Quote
Old 02-15-2008, 12:02 PM   #8
seeker777
Triple-A Player
 
Join Date: Apr 2007
Location: Royal Oak, MI U.S.A.
Posts: 201
el Charlot, another forum over at MacRumors reminded me of your issue.

What did you decide upon to fix your issue?
seeker777 is offline   Reply With Quote
Old 02-17-2010, 10:57 AM   #9
Q
Guest
 
Posts: n/a
Lightbulb Another idea!

Hey guys,

In an effort to store my music on an external hard drive and delete it from my computer's hard drive (default iTunes folder in My Music), the exact same thing happened to me. All the songs in my iTunes Library, about 2000, were marked with the exclamation mark. I was desperate because I couldn't find any application in iTunes to "locate" multiple missing files, and searching on the Internet brought me to this forum.

Trying out EatsWithFingers's suggestion, I went to my preferences in iTunes... You have to know that I already changed the iTunes Media location folder to my external hard drive, but for some reason, iTunes set it back to the default folder in My Music, on my computer's hard drive. Like I said, I had already deleted all the files there and moved them to the external hard drive, so no wonder iTunes couldn't find them. When I set the iTunes Media location folder back to the external hard drive and unchecked "Copy files to iTunes Media...", iTunes started to "upgrade" my library and all my files were back to normal!

None of the so-called metadata (something that's rather important to me) was lost, and I can play all of the songs. I don't know if this is helpful, cause maybe my problem was a little different than yours or it was just a coincidence. But anyway, it worked for me!

Greetz, Q
  Reply With Quote
Old 05-24-2010, 01:46 PM   #10
Waheiba
Prospect
 
Join Date: May 2010
Posts: 1
Fix Grouped Broken Links (XML editing)

I successfully fixed the file paths of over 2100 files together (or thats what the text editor said)

I used an XML editor (notepad++ on windows, didn't need to fix anything on mac) to open the file "iTunes Music Library.xml" not the itl file, which is a binary file.

I used find and replace on part of the old path to the new path and saved the file.

make sure that iTunes is closed.

I hope that works for u
Waheiba is offline   Reply With Quote
Old 10-21-2010, 11:24 PM   #11
miafins57
Guest
 
Posts: n/a
Solution found! All you have to do is go to iTunes, Preferences, Advanced, and change the location of the music folder (where all your music is located). Then you go to any song that has a (!) marked on it and click locate. Locate the file and then iTunes will ask you if you want to find the rest of your songs using this similar location. Click yes and BAM! All your songs will be found! Enjoy!

Miafins57
  Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 08:25 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.