James Stout
dab3ddcf7d
|
4 years ago | |
---|---|---|
.gitignore | 4 years ago | |
README.md | 4 years ago | |
iTunesLibrary.php | 4 years ago | |
playlistRecover.php | 4 years ago |
README.md
PHP files that attempt to recover playlists from iTunes Library XML files.
Usage
See playlistRecover.php
for example usage.
Why?
I moved my iTunes Music folder to a new disc, I don't think I did it properly, so all my playlists were empty, the tracks in them had new IDs and locations.
There might be a way to recover using iTunes, but with a 250GB library, it's a faff moving it around.
So I found myself with an new 'iTunes Library.xml' with empty playlists, but with the new track IDs, and an old 'iTunes Music Library.xml' with the old track IDs and names.
This script loads up both the old and the new libraries, then, for each track in each playlist in the old library, it looks up the ID in the new library, using the track name and other properties to find the track in the new library.
Then, if you want, it writes each playlist to an XML file that can be imported into iTunes.
Example Output
Thanks
This was made possible by the work of mheap and his iTunes-Library-Parser