5

A few points before I get into my question/issue:

  1. I am not looking for a way to convert file formats.
  2. The library and all music is located on another Mac on the local network (so it is not indexed by spotlight and no spotlight-based applescript solution will work).
  3. I am not willing to re-rip all the songs in my library, and in many cases I can't anymore anyway as I've let the physical CDs slip into oblivion over the years as I never used them.

Now, For the short version:

We have two different iTunes library files, both stored on the same local network server (another Mac) as the music files themselves. My library and her library are different, but there is a fair amount of song overlap between the two.

I have used iTunes Match to replace about 5,000 of the songs in my library, with 256kb AAC .m4a files rather than the various qualities of .mp3 files I had previously.

Unfortunately this has resulted in a large number of broken file links in her playlists, because the old file reference was .mp3 and the new file is .m4a. iTunes will allow me to manually re-link each file one by one, but cannot automatically find any others.

How can I get her library, to changes its references from the .mp3 files it knows about, to the newer .m4a files, where applicable?

Note that this does not apply to EVERY file in her library, only to those files that overlap between her library and mind, and that were matched by iTunes.

MORE DETAIL FOR THOSE WHO CARE:

I have a library consisting of about 15,000 songs, almost all of which are mp3s of various quality ranging from 96kb to 192kb. I have wanted to de-duplicate this library for some time, as well as increase the quality of the tracks since storage is so much cheaper these days. However the time & effort involved in doing so has been daunting.

Then yesterday I discovered (well, finally signed up for) iTunes Match. After a bit of searching for various "power user" techniques, I found that I was able to reliably de-duplicate my library in a huge and automated way, bringing it down to the current state of about 15,000 items. Not all of these are "music" however, many are audiobooks, podcasts, etc. iTunes Match was able to match up about 5,000 songs, and uploaded a few thousand others.

Now to the problem. My wife has a separate iTunes library file so that she can run iTunes at the same time I do. We don't share all of the same music, but there is a fair amount of overlap. My library is fine as I have re-downloaded all the 5,000 files with 256kb AAC versions from iTunes Match and deleted the old mp3 files. But now my wife's library doesn't reference these same new files.

I can go through her "missing" songs one by one and locate them, but there are thousands of them. The iTunes "find other missing files" feature is useless here, and finds nothing (I think because of the change from mp3 to m4a but I can't be sure).

So the question ultimately is - how can I, in an automated or batch way - get her library to look at the new .m4a versions of the songs, rather than the mp3 versions which are now gone? I don't especially care about the metadata on her library since she doesn't use it, but I want to make sure any changes will not affect my metadata, as I do use it.

I considered editing the library xml file but realized that this won't help, as it's the database itself that would need alteration and the xml is just an output generated from the DB itself.

EDIT: Hopefully my new "short version" is clearer for those who didn't understand what I was asking before.

7
  • Since you don't care about the metadata, why not clear the library and then re-add all the songs?
    – tor
    Commented Sep 16, 2012 at 5:24
  • Ah good point I forgot to put in my original post. She has playlists that reference specific songs, re-adding all the songs would still leave all her playlists broken as they are currently. Also, she doesn't want all of my music in her library, and importing everything would do exactly that.
    – JVC
    Commented Sep 16, 2012 at 6:43
  • It seems that the title and a lot of the question are misleading or irrelevant. As I read it, you now want library B to be just like library A but it's not clear if her library is on the same computer as yours or perhaps the same user account as yours. It seems you want the music files mounted remotely / centrally, but I think we're missing some information on what parts of the puzzle are solved and what remain.
    – bmike
    Commented Sep 18, 2012 at 20:42
  • 2
    @JonathanvanClute If I understand the question correctly, you have two user accounts with local iTunes metadata both accessing the same music files on a network drive. After signing up to iTunes Match from one account, about 5'000 music files got replaced by m4a resulting in 5'000 broken references in the other account. And now you are looking for ways to fix this without having your wife re-define all her playlists? If yes, can you please shorten your question down to the essentials? It at least increases the chance that somebody will a solution (honestly I don't think there is).
    – nohillside
    Commented Sep 18, 2012 at 20:58
  • Not only two user accounts, two computers - hers and mine. They are 100% independent of each other, and both have their library files (xml and itl) stored on the network server with the music. Otherwise though, yes I believe you've got it right.
    – JVC
    Commented Sep 18, 2012 at 22:53

2 Answers 2

1

I dissected the XML file a bit and it turned out to be a XML property list (sort of a XML-based JSON equlivant), so it becomes easier to handle. If the files affected have the same name not counting its extension, some Objective-C can be laid down to change it. Do you have Xcode installed or should I prepackage it for you?

0

It is possible to use the .xml file I think. When I reinstall my MacBook I export the iTunes library. I import it as a playlist after a fresh install. This ensures that I keep my metadata (play count is very important to me).

You could thus edit the .xml file, clear your wife's database (make sure you keep a backup) and then import your edited .xml file. However, editing can take a lot of time, depending on what has been changed. Is it just the extension (mp3 to m4a), or have the file names and path names also been changed.

Maybe you can come up with an if-for loop that replaces the path and filenames in the xml file of your wife with the ones in your own database (e.g. if line contains "artist" "album name" "word from title" find it and replace it with line with same qualifiers from your own database).

I actually had a similar problem which was discussed here: http://www.linuxquestions.org/questions/programming-9/replace-line-with-line-from-other-file-if-947590/

2
  • An interesting suggestion, though in my situation I can see a lot of places where this could break, since the conditions for replacement are not always crystal clear. I'm going to edit my question since it seems that it is unclear to many people.
    – JVC
    Commented Sep 18, 2012 at 22:44
  • If the conditions are not always crystal clear, the re-linking can't be automated.
    – nohillside
    Commented Sep 19, 2012 at 3:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .