Someone smarter than me - please help me figure this out - songs can't be found

This issue has lingered for years, but I am currently on iTunes 12.5 on Yosemite.


At some point in time, and I can not associate it with any specific event like an upgrade, a large amount of my 13,900 songs became "broke" - unable to locate. Not all, just a portion..maybe 1/3 to 1/2.


I have trouble shot and gave up many times, not wanting to do a drastic rebuild, I just skipped the songs that were broke.


I let iTunes manage my Library - always have. All files, including "broken ones" are sitting right in users/myname/music/iTunes/iTunes Media/Music/Artist....right were I would expect them all.


I recently found an album that had two songs right next to each other, one "broke", the other plays fine. If I go in finder they are right where they should be.


If I look at the .xml, the Location key says the identical location, just different name for the song...and that location/song name combo matches the location in finder.


Here are two songs from the same Album next to each other:


User uploaded file


Track 651 Sugar Magnolia is fine and plays, Track 652 E_One More Saturday Night is "broken" and can't be found.


Here is the xml data on the two files, you can see locations are correct:


<key>6023</key>

<dict>

<key>Track ID</key><integer>6023</integer>

<key>Size</key><integer>14551501</integer>

<key>Total Time</key><integer>505391</integer>

<key>Track Number</key><integer>20</integer>

<key>Year</key><integer>1979</integer>

<key>Date Modified</key><date>2008-12-23T19:46:10Z</date>

<key>Date Added</key><date>2010-04-17T01:23:05Z</date>

<key>Bit Rate</key><integer>230</integer>

<key>Sample Rate</key><integer>44100</integer>

<key>Play Count</key><integer>1</integer>

<key>Play Date</key><integer>3380317111</integer>

<key>Play Date UTC</key><date>2011-02-12T05:58:31Z</date>

<key>Skip Count</key><integer>1</integer>

<key>Skip Date</key><date>2016-09-21T15:52:06Z</date>

<key>Rating</key><integer>100</integer>

<key>Rating Computed</key><true/>

<key>Album Rating</key><integer>100</integer>

<key>Persistent ID</key><string>859F0AE52E3FACA9</string>

<key>Track Type</key><string>File</string>

<key>File Folder Count</key><integer>5</integer>

<key>Library Folder Count</key><integer>1</integer>

<key>Name</key><string>d3t03 - Sugar Magnolia</string>

<key>Artist</key><string>Grateful Dead</string>

<key>Album</key><string>1979.12.01 Pittsburgh, PA (SBD)</string>

<key>Kind</key><string>MPEG audio file</string>

<key>Location</key><string>file:///Users/myname/Music/iTunes/iTunes%20Media/Mus ic/Grateful%20Dead/1979.12.01%20Pittsburgh,%20PA%20(SBD)/20%20d3t03%20-%20Sugar% 20Magnolia.mp3</string>

</dict>

<key>6025</key>

<dict>

<key>Track ID</key><integer>6025</integer>

<key>Size</key><integer>8459472</integer>

<key>Total Time</key><integer>291474</integer>

<key>Track Number</key><integer>21</integer>

<key>Year</key><integer>1979</integer>

<key>Date Modified</key><date>2008-12-23T19:46:10Z</date>

<key>Date Added</key><date>2010-04-17T01:23:05Z</date>

<key>Bit Rate</key><integer>232</integer>

<key>Sample Rate</key><integer>44100</integer>

<key>Play Count</key><integer>2</integer>

<key>Play Date</key><integer>3472053636</integer>

<key>Play Date UTC</key><date>2014-01-09T00:20:36Z</date>

<key>Rating</key><integer>100</integer>

<key>Rating Computed</key><true/>

<key>Album Rating</key><integer>100</integer>

<key>Persistent ID</key><string>0AD50DB205887189</string>

<key>Track Type</key><string>File</string>

<key>File Folder Count</key><integer>5</integer>

<key>Library Folder Count</key><integer>1</integer>

<key>Name</key><string>d3t04 - E: One More Saturday Night</string>

<key>Artist</key><string>Grateful Dead</string>

<key>Album</key><string>1979.12.01 Pittsburgh, PA (SBD)</string>

<key>Kind</key><string>MPEG audio file</string>

<key>Location</key><string>file:///Users/myname/Music/iTunes/iTunes%20Media/Mus ic/Grateful%20Dead/1979.12.01%20Pittsburgh,%20PA%20(SBD)/21%20d3t04%20-%20E_%20O ne%20More%20Saturday%20Nigh.mp3</string>

</dict>

<key>6027</key>



Here is the Finder physical file location of both files:


User uploaded file




ONE DIFFERENCE I DO SEE:


When I right click - Get Info in iTunes, the "location" info is different - the "broke" file includes the "file:///" and the songs that play fine do not (starts with /users/). Meta data is the same.


User uploaded file

The above file plays fine, this one does not (and this is consistent with all thousands of broken files:


User uploaded file


So I am stumped - any help would be greatly appreciated. I thought I was going to need to do a simple "search and replace" for "file://" but after reviewing the xml file and meta data, I am stumped.


Oh yeah - here is the meta data for the "broke" song above that has the "file://" in the location:


User uploaded file


...it shows the location like the other playable songs...just /users/...


stumped

iPad 2, iOS 7.0.3

Posted on Sep 21, 2016 4:46 PM

Reply
11 replies

Sep 22, 2016 2:58 PM in response to meegwell

You wouldn't guess this but I have spent a good 30 minutes over the past day trying to find out why you are getting those "file:///", just trying again before coming back here and seeing your follow-up post. 🙂 I still have no idea and it is hard finding any hits on a search engine for that string.


If you find one broken link manually, iTunes should ask if you want it to try and repair others. This only works if you let iTunes manage/organize your media.

Sep 22, 2016 2:58 PM in response to Limnos

Bingo my friend. Check it out - first, out of all my songs I chose the worst broken one to t=test, since the name change was so subtle I didn't even notice it on my first check. I change the file, dropping the "t" in Night. Here is what happened with the info:

User uploaded file


See how the file:// disappeared?


I also went and looked specifically at file names for the other broken ones and they are all messed up...much worse than dropping the last letter. It looks like something tried to rename the files by appending different aspects of meta data. For example:


This file:


User uploaded file

actually in Finder looks like this: "18 d2t04 - Lost Sailor - _.mp3"


I know from my own naming conventions that many of my files are named similar to what is in the info above....but that actual file name was corrupted somehow, and it looks like the 18 is the track number, the d2t04 is leftover from my original naming of the disc import, and Lost Sailor is the name of the song when meta data was imported.


Looks like fixing this mess is not going to be as easy as I hoped. Thank you so much for taking a deep look.

Sep 22, 2016 3:08 PM in response to meegwell

I have one more intriguing thing to add...it looks like this only affected songs with longer names. "One More Saturday Night" - 20 characters, 23 w/ spaces...


I was scrolling and noticed it with the song "06 The continuing Story of Buffalo Bill" - broken with no broken links around it. Then I scared down the screen and noticed the length of the broken songs...just visually:


User uploaded file

Sep 22, 2016 5:58 PM in response to meegwell

Again, make me wonder if these came from a different drive or something. I am not up on file name length standards these days but I recall back when I used OSX 9 or something a long time ago file names could only be 64 characters or so. I think filenames can be 256 characters now but if you were using these on a FAT formatted drive recently it may have forced truncation.


You also have to be careful in how you name things, or at least I am. OSX and Apple software is pretty robust against no-no characters in names and handling them but several characters have special meaning and it is best to avoid them where they might end up as file names. Then too there's how they are handled as POSIX and in the Unix background. I avoid using : and / because they are used as path delimiters in the underlying file system. Again, OSX seems to be able to figure out how to handle cases where you may have a tag in iTunes become part of a path name but I figure why ask for trouble?

Sep 23, 2016 3:06 AM in response to Limnos

Sorry- no, same local iMac drive for its entire history. I use time machine i should have investigated back when i first noticed it. On naming conventions I am a stickler also being raised on DOS. My convention is the gd791208d1t2.mp3. for grateful dead december 8 1979 disc 1 track 1 ....but many many files i have recieved where i am not importing from a disc so files are named by someone else. The song name length was just an observation - i agree not related to traditional file limits - some of thise song titles actual had short file names.


What really stumps me though how an album like the beatles white album example can all be good but 3 tracks..even though the album was added all at the same time and never moved. Nuts.

Sep 23, 2016 5:53 AM in response to meegwell

In your first post you said:

I let iTunes manage my Library - always have

This implies iTunes is organizing the files as it would like and it is renaming them as it would like, so you are not letting iTunes manage your library. If you have those settings and rename a file manually it could cause broken links. I also wonder if getting files from a different system messed with the filenames because of the truncation methods used to meet the demands of the other system. I remember seeing truncated names like yours many years ago but it was when I was using OS9 or something. In fact it was a bit more complicated because each file has some kind of garbage string that ended the file name that I presume was iTunes way of handling too-long track names when it came to using them to name files in Finder. I wonder if some of your files ended up with special characters encoded by another system which didn't translate well. Even if they appear normal there are different variants on ASCII and UTF.

If you are going to rename files or want them named by your convention make sure you disable the "organize" option in iTunes > Preferences > Advanced. Realize in doing this you are taking on management of the library yourself and losing certain options such as iTunes' feature to try to re-link broken links.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Someone smarter than me - please help me figure this out - songs can't be found

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.