Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'One solution for iTunes 'can't find file' problems' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
One solution for iTunes 'can't find file' problems
Authored by: Frederico on Dec 02, '06 03:39:05AM

As posted above in a side thread, would not the ability to Option-key-launch iTunes, which allows for multiple Library use, at least prevent all the tedious shutdown precautions, and consolidation issues?

As I understand it, the ultimate problem stems from the desire to consolidate music stored locally when away from the FW HDD, to said FW HDD when next available, yet the preservation of metadata is the sticking point, yes? If you could transfer that metadata intact, would this not be better than lengthy consolidations of entire library contents? Yours is rather small; between audio and video, mine is more than 200GB and ~20K titles; I'd shudder to think about that kind of transfer time.

I have a related issue in that I add all newly created music, rips, videos, etc. and iTunes Store purchases to my main workstation at home, but I periodically want to use all that content on my work network, and, I, too, do not want to have to regenerate (at least part of) the metadata, ratings, in particular. My solution is to write the normally non-transferable ratings to the comments field of each track via AppleScript, then transfer the items to work, add to the work iTunes Library, and use the same AppleScript to write the ratings back to the Ratings field. Since I treat ratings as a fairly static assessment of a song's overall quality, I am not worried about synchronizing any rare changes on either end.

To assist in the process, I create two smart playlists on the master machine; one looks for tags in the Comments field to see if the metadata has been applied to the field, and if it matches the currently displayed metadata; if not, it is added to the list indicating the Comments field requires updating; the second list on the master machine lists all songs whose metadata is current and was added after the last transfer date, this serves to both prompt me to backup these items for safety, and I use those backup disks to transfer the songs to work.

At work, there is a smart playlist that looks for tracks with metadata in the comments field that does not match the locally displayed data, and this limits the number of tracks to be updated from the comments field.

I started this meta-comments practice the first time I lost my iTunes Library, and could not repair it, and my least-old, non-corrupted backup was so old that it took better than 30 hours to redo. I was not happy. By having the desired metadata in the comments field, it is always attached to the ID3 tag embedded in the file itself.

I sure wish we could add our own ID3 tag fields. I realize that "sharing" ratings and play-counts and such is not always desirable when "sharing" songs, and thus it is overlooked as needed by whomever write the ID3 specs, but I think it should be easier to retain such data if you so choose.

It should also be possible to extract metadata from one Library.xml file and use it to replace the data in another, but it would require iTunes not be running, I think, and would take a fair amount of scripting via the shell using grep, and a whole bunch of error checking to prevent issues with duplicate tracks.



[ Reply to This | # ]
One solution for iTunes 'can't find file' problems
Authored by: Mac Berry on Dec 03, '06 06:21:37PM
As I understand it, the ultimate problem stems from the desire to consolidate music stored locally when away from the FW HDD, to said FW HDD when next available, yet the preservation of metadata is the sticking point, yes? If you could transfer that metadata intact, would this not be better than lengthy consolidations of entire library contents? Yours is rather small; between audio and video, mine is more than 200GB and ~20K titles; I'd shudder to think about that kind of transfer time.
Not quite. The consolodate function works perfectly for copying (I do wish it would move rather than copy though) music from my local drive to the external one, if I've added that music to my library while the external drive is disconnected, meta data included. What it doesn't do is re educate the library to know that pre-existing music is now available again on the external drive, if it's tried to find it while the drive wasn't there. Option launch allows a second library to be used, but that doesn't solve the issue either, because I don't want music I add while away from the drive to go into a second library, mainly because it won't be staying there and so will be "unfound" when I next use that "mobile" library. What I really want it to do is keep the path to the library as I set it, whether or not the drive is connected, tell me that the path isn't available (but not actually change anything) if I try to play or otherwise interact with a file while disconnected, and use a temporary location for music I add while disconnected. Ideally it would then also move that new music to the external drive when it does become available.

[ Reply to This | # ]
One solution for iTunes 'can't find file' problems
Authored by: Frederico on Dec 06, '06 08:34:32AM
I guess I didn't write very clearly while being so sleepy. The methods I describe will do what you are asking, save the prevention of launching when your external drive is offline. Before iTunes was smart about dealing with unmounted network shares, this was resolved, again, with AppleScript.

A simple script can be written as an iTunes launcher (a clickable app, or, my preference, a script invoked by keystroke through a long list of available keystroke-launchers) to detect if your standard external drive path is present, and, if not, either mount the share (if available), prompt you to find the share manually (assuming it should be available but is not), or cancel the launch of iTunes. Note: use of this type of setup all but necessitates the need to turn off auto-launching of iTunes by such things as Audio CD insertion, iPod mounting, etc.

In your case, you would want this launcher to prompt you to use a local Library, to prevent the dreaded '!' effect. This should be possible by using 'keystroke down' commands from Standard Additions; at worst, it would ask you to hold the 'Option' key after a resulting dialog.

Example (less than two minutes work):

set myExernalDrive to "MusicDriveName"
if (list disks) contains myExernalDrive then
	tell application "iTunes" to activate
else
	display dialog "The drive " & myExernalDrive & ¬
		" is not present." & return & return & ¬
		"Please hold the 'Option' key down and Press 'Continue' ¬
	to allow iTunes to choose an alternate Library."
	tell application "iTunes" to activate
end if


Once you are up and running locally, use iTunes as desired, add tracks, etc.

Before closing iTunes, transfer metadata of new tracks to comments field.

Upon launching iTunes (via special launcher), the same script should now allow you to not only reselect your external library, but also easily detect the existence of files added to your local library, and add them to your master external. You can also choose to move them (best to copy then delete, for safety sake) at your option. The script can also then automatically deal with the updating of metadata to the master.

This sounds complex, but much, if not all of it has already been written in component form, and need only be combined. Even the repair of the dreaded '!' issue is easily resolved by simply using the 'Add to Library' command, though, I seem to think that any "Missing Tracks" that are mis-reported when a drive is temporarily not available are now automatically fixed the next time it is.

[ Reply to This | # ]