Edit the iTunes Music Library.xml

Discussion in 'Mac Apps and Mac App Store' started by lowfi, Oct 12, 2007.

  1. lowfi macrumors newbie

    Joined:
    Sep 8, 2006
    Location:
    Geneva, Suisse
    #1
    Hi,

    I have moved some files to a netwrok share. I want to edit the iTunes Music Library.xml so i wont loose info such as playcount etc (and synces to appletv are reset). I know in the iTunes Music Library.xml there is a location string. So technically i could change for example:

    <key>Location</key><string>file://localhost/Users/lowfi/Movies/1408.m4v</string>

    into:

    <key>Location</key><string>file://Volumes/External/Movies/1408.m4v</string>

    Although this doesnt seem to work because every time i start itunes again it cant find the files :( When i close itunes again and open the xml again all previous changes ive done before are undone (yes i have saved changes ;) )

    Is there perhaps another way or am i missing something?


    Thanks :)
     
  2. plinden macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #2
    Did you quit iTunes before making the changes?

    By the way, if you're using a Mac, you should look at Doug's scripts for iTunes. There may be something there you could use so you don't have to edit the library file directly.
     
  3. netdog macrumors 603

    netdog

    Joined:
    Feb 6, 2006
    Location:
    London
    #3
    Why didn't you just change it in preferences? A whole lot easier.
     
  4. plinden macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #4
  5. lowfi thread starter macrumors newbie

    Joined:
    Sep 8, 2006
    Location:
    Geneva, Suisse
    #5
    I moved around 300 files so doing it one by one is of course a possiblity but i thought doing a simple find and replace in textmate would be a lot easier.

    Imagine if i moved around 20gigs worth of music :p One by one... :Z

    Ill try the script :)

    thanks
     
  6. lowfi thread starter macrumors newbie

    Joined:
    Sep 8, 2006
    Location:
    Geneva, Suisse
    #6
    Ok! Found it :D

    So appereantly itunes first looks in the iTunes music library.itl file. If there is data in there it skips the xml file. So i removed everything from the itl file did a find and replace in the xml find and restarted iTunes. After that iTunes found all my newly editted files on a network storage :)

    The script didnt work because in tiger, spotlight isnt able to search network shares. (the script uses spotlight to locate missing files)
     

Share This Page