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



Reply
 
Thread Tools Rate Thread Display Modes
Old 03-22-2006, 08:19 PM   #1
mweier
Prospect
 
Join Date: Feb 2004
Location: Minneapolis, MN
Posts: 31
Cool batch change iTunes track locations to new drive?

I've got a big iTunes library - lots of playlists/tracks/etc.

My iTunes library was set to a network volume, file://localhost/Volumes/E/Music/

I've recently moved all of my files to a new network volume, file://localhost/Volumes/MUSIC/

I changed the iTunes library location in the prefs and told it to consolidate the library, thinking this would help it learn that all the music is already in the new location.

Somehow it must have choked and so now half my music knows it's in the new location if i Get Info in iTunes and look at the "Where" field. The rest of the music still thinks it's in the old destination.

Is there anyway (without losing all my playlists) to tell it that really it should be looking in the new volume for all the music, since it is in fact all there right now?

I had the idea to just do a simply find/replace in the iTunes Music Library.xml. This didn't really seem to change anything (I have no idea why it even has that xml file since it seems to rely on the database file instead for its knowledge of file locations).

I've tried running Consolidate Library again but now it says there's not enough room on the new volume (since it already has a copy of all the music, there's not enough room to fit it all twice).

any hints/workflows/applescripts/etc that will sort this out? If I just delete all the tracks in my library and re-add them all, will my playlists be broken since they still expect the files in the old location?

If anyone has any better options for having itunes on multiple computers having full playlist generation control over a single network shared mp3 library, i'm open to other suggestions -- seemed to me like having a single share that they all point to as their library would be simplest since then I'm not restricted functionality-wise to using iTunes to play from a shared playlist.

--edit---
I just found this itunesTrackCPR applescript http://www.dougscripts.com/itunes/sc...itunestrackcpr
However, I am a bit afraid to try it since these tracks pointing to the old volume aren't (yet) deemed "missing". Will it work? Has anyone tried it? If I rename the old volume's folder (making the path no longer valid) what does it take to make itunes evaluate which songs are missing so that the script can do its magic and look in the new volume to see that the tracks are all there?

Last edited by mweier; 03-22-2006 at 08:31 PM.
mweier is offline   Reply With Quote
Old 03-26-2006, 11:53 AM   #2
mweier
Prospect
 
Join Date: Feb 2004
Location: Minneapolis, MN
Posts: 31
Unhappy

well, apparently there must not be any simple way to fix messed up iTunes databases filepaths or the geniuses here would have told me

I changed the name of the folder of the old music network volume I was using as my iTunes music folder. This successfully flagged as missing all the tracks that iTunes didn't realize were on the new Volume. I then tried that iTunes CPR applescript on a few of the files. It worked! I then selected all of my tracks by artists A-B and it totaly choked with applescript timeout. I then relaunched iTunes and started doing a few clumps of 4-5 tracks at a time which were flagged as missing. Some were fixed. Some weren't. In that there were probably over 8000 tracks it was screwed up about, that didn't work.

In the end I ended up having to completely delete everything from my iTunes library (but not have it delete from the hard drive), thereby destroying years of work creating playlistts. LAME!!! Why iTunes playlists don't simply rely on a relative filepath structure that you can re-orient by changing your iTunes library location in advanced prefs is completely beyond me. Probably the same reason they don't let you just make a M3U playlist on an external hard drive and let you carry the drive with you to work and have the playlist still work on a different computer. That reason is to be mysterious in its supposed supremacy over other audio apps and probably to gain some sort of performance boost off its proprietary library database format.

So, in the end I'm pretty frustrated and effectively defeated. But at least I can play all my music again and got iTunes to pull its head out of its........ to know that all the music that was in my old library location (a location it's finally completely unaware of as intended) is in fact in my new library location. Time to start making new playlists again....
mweier is offline   Reply With Quote
Old 03-26-2006, 11:57 AM   #3
styrafome
Hall of Famer
 
Join Date: Nov 2004
Posts: 3,818
My memory is fuzzy on it but in the past when I've changed iTunes folders it seems to help to drag the folder on top of the iTunes icon (in addition to changing the path in Preferences).
styrafome is offline   Reply With Quote
Old 03-26-2006, 12:40 PM   #4
Bigc
All Star
 
Join Date: Mar 2004
Posts: 552
couldn't you have saved your playlists as xml files then reimported them? I do it all the time...usually finds most of the tunes in the old playlists.
Bigc is offline   Reply With Quote
Old 03-26-2006, 08:27 PM   #5
mweier
Prospect
 
Join Date: Feb 2004
Location: Minneapolis, MN
Posts: 31
bigC - VERY COOL. I have a backup of the old library pre-destructo. I swapped that in for the nuked/resurrected one and exported one of the playlists as XML. I then opened the XML and did a find/replace to fix the path on everything that was still looking in the old music volume. I then reverted to the new library which has correct paths but no playlists. I then imported the XML and though it griped claiming it couldn't find all the music, it seemed to get 99% of it and the playlist is 100% functional! Cool!

Anyone have any tips for automating this rather time consuming process? (i've got a fair number of playlists). Any applescripts would be appreciated since I've got very few skillz in that respect. Scripts that would help could include exporting every playlist as XML, or performing the same find/replace on every text file in a folder (I think I can do that in Dreamweaver if I define this pile of XML as a site). Or, if you're ultra hard-core and know of one script that does it all, that'd be sweet. Importing every file in a folder to iTunes seems something it can do natively so I don't think I should need one to do that once I swap back to the new library, right?

Last edited by mweier; 03-26-2006 at 08:53 PM.
mweier is offline   Reply With Quote
Old 03-26-2006, 08:43 PM   #6
mweier
Prospect
 
Join Date: Feb 2004
Location: Minneapolis, MN
Posts: 31
never mind re: quicker way to do it. Once I realized I'd be able to fix all the XML playlists' paths at once via mass find/replace for entire site in Dreamweaver, I figured it would take less time to just export each one by hand than to go research (or write) an applescript that would do that automagically.

it's going swimmingly and I think I'll manage to rescue them all! thanks BigC for the tip! (my only mistake was that I accidentally exported the library as XML at one point and so while the find/replace for most playlists was fairly speedy, it took FOREVER to run when it hit Library.xml since it's a ridiculous huge 22MB xml file)! I ended up killing the find/replace on that one so I could trash library.xml before rerunning the mass find/replace.

Seems I can't figure out any way to import multiple xml at once... can't drag an XML file to the library, to the "Source" area, or to the iTunes icon. Only way I can figure to bring them in is File>Import one XML at a time. Still takes less time to do this than recreate every one of the playlists from scratch!!!

Last edited by mweier; 03-26-2006 at 08:50 PM.
mweier is offline   Reply With Quote
Old 03-27-2006, 09:01 AM   #7
Bigc
All Star
 
Join Date: Mar 2004
Posts: 552
yeah, been there, try 150,000 file xml export.

thankful for the 3-finger salute...

I learned a while back to save my playlists for various reasons...
Bigc is offline   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 07:48 PM.


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.