PDA

View Full Version : Carrying iTunes library statistics to server after moving drive?


Anvilman
05-19-2005, 11:51 AM
Hi there,

Ive searched for this, but haven't found anything very useful.

Here's my situation, lets see how brilliant you folks are ;) :)

I used to have all of my music stored on "PC 1"... my iTunes library was connected to all of those files.
I just moved that drive (where all the songs were) to my media server "PC 2"
Obviously, my iTunes can no longer find the files since they are on PC 2 instead of PC 1 now.
I want to have iTunes point to those songs on the other computer (which is on my network and i fully sharing), BUT i want to keep my extensive iTunes stats that I've been working on for over a year.
It is essential that I keep my stats, I know how to easily add the music back to my library, but that would simply create a new library, in a way.
Soooo, do I need to copy over some of my iTunes special library database files to the new computer and run iTunes off of it or something? I want to control iTunes from PC 1, but the files are stored on PC 2.


If you need more details, please ask. Ill be very impressed if anybody has a viable solution.

PS) Stats are essential b/c I have 11k+ songs and cannot risk losing all my ratings.

PPS) Whoever gives me a working solution will be given an account on my ftp to do, uh, whatever they like ;)

jkcoon
05-21-2005, 10:29 AM
I am facing a similar problem. Recently upgraded to a new hard-drive, mohterboard, and chipset all at once. Need to move my data to the new drive. I have done extensive research and this sounds the most pratical. I haven't personally tried it yet but intend to soon. I am copying all my music files to the new drive now. I will let you know how it works.

Exerpt from article.... lounge wont let me post URLs

I think iTunes is great as a player, because it allows me to build all kinds of so-called 'Smart' playlists, using some easy rules that can be combined to wonderfully complex things, all just in order to come up with the right song to play next.

Problem is, this being Apple software, it has a tendency to give you the choice of letting it control your life (shut up and be happy) or giving you absolutely nothing to work with if you decide to opt out of preconfigured bliss. Specifically: if you allow iTunes to 'organise your music folder' (meaning: totally butcher any ideas that you might have yourself about what makes up a logical way of organising your music files) you are allowed to move the library around to other disks or whatever else you could think of in confined user land.

The reverse is the actual problem: move a music file and iTunes will treat it as a new file, which obviously resets play counts and 'Last Played' dates. Some ideas that you might try, to no avail:

Edit the 'iTunes Music Library.xml' file with your favourite text editor only to find it ignored first and overwritten second.
Delete the binary 'iTunes Music Library.itl' file and your entire library will vanish.
Import an export or a modified XML file and the entries will be treated as new files.
I searched a lot of fora, but all relevant posts and discussions I could find are either OSX oriented, using AppleScript that (AFAIK) does not run on Windows or advising you to take the bliss option outlined above.

But ... I seem to have stumbled on a working solution by myself! Hurrah!

The trick is very simple: do not delete the 'itl' file, but empty it. Upon startup, iTunes will (re)import the XML file, but more in an attempt to salvage data--including my and your precious play statistics. A message follows that the itl file has unforunately gone corrupt and all that could be done has been tried. It even saves a copy of your emptied file. :)

Given that the XML stores not only music data, but also the playlist definitions, you are good to go from this point on.

Instructions for technically timid folk (on Windows!):

Shut down iTunes
Make a backup copy of these files:
iTunes Music Library.xml (on my system, it is located in My Documents/My Music/iTunes)
iTunes Music Library.itl (on my system, it is located in My Documents/My Music/iTunes)
If you have the disk space to spare and you are truly paranoid, backup your actual music files as well.
Open the itl file in Notepad (or any other text editor, but not in Word or any other word processor).
Select all (Ctrl+A) and hit Delete. You should now have an empty file.
In Explorer, verify that the file size is indeed now 0Kb. I haven't tried partially damaging the file, but this method is a sure-fire way.
If you haven't already, do whatever you want to do to your music folder(s): move them all to a new drive, shuffle some of them around, etc.
Open the xml file in your favourite text editor and modify the paths as they should be, reflecting the new location of your music files. Global search and replace comes to mind as a quick way of making these changes. Don't worry about mistakes--you did take a backup, did you?
Save the file and fire up iTunes. Instead of starting normally, it will import the xml file. I have some 6500-odd entries in it and a dozen playlists. With the files on an external USB2.0 drive, it takes a few minutes for this to complete, which is indicated by the warning message about how iTunes discovered that your library file had gotten damaged and how it tried to save the day. Click OK.
If all is well, you should now be looking at your library, with all data intact and the locations of the music files updated.
Note: I have the setting enabled to equalise the volume. Upon re-importing the xml, iTunes will 'Determine song volume' on all the songs. Depending on the size of your library, this might take a while, but it is otherwise harmless. Just let it do its thing.

Last note: be sure to exit out of iTuens cleanly at least once, so that it will rebuild the itl and xml files to be in sync again. I can't say what will happen if you don't, but based on past experience, I would say that only Bad Thing can happen from that.

jkcoon
05-21-2005, 09:23 PM
Works like a charm... let me know about that ftp access.

Anvilman
05-22-2005, 04:17 PM
Originally posted by jkcoon
Works like a charm... let me know about that ftp access.
thanks, plz email me at robin(at)onemorepill.com

jlofty9
06-25-2005, 09:49 PM
jkcoon, your a legend my friend. I was nearly there.... did the changing the .xml file bit..... the wiping the .itl file was what I was missing. Cheers!!!!!!!!!!!!!!

rkellogg9
06-28-2005, 10:47 PM
Tag