Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Missing files after moving iTunes to new hard drive
K0mixPRO InfinityMember since 2012
Clarifications:
1. I have solved this issue, but have seen similar posts around so thought it might be useful to post the solution that worked for me.
2. Windows 10, VirtualDJ V8.5-64b7032, iTunes Version 12.11.0.26


TL;DR Tracks in iTunes playlists were unlinked in VirtualDJ. Correcting the addresses in the iTunes Library.xml database solved the issue.

Problem
I recently moved my iTunes and all my music to a new hard drive. When I did this, I updated the location of the iTunes Database File in the VirtualDJ options, and was able to access my iTunes library and playlists from the browser as normal.

However, most of the tracks in the iTunes playlists were marked as missing, and were therefore not able to be played. Right-clicking on a track and selecting "Relocate file" opened a Windows Explorer window straight to the correct location for the track, so I could select the correct file and it would be properly linked again in VirtualDJ. When I closed and reopened VirtualDJ though, the files would be unlinked again.

Diagnosis
The issue for me lay with the iTunes database XML file, which is stored in the iTunes folder. My music is stored in the 'iTunes Music' folder rather than the newer 'iTunes Media' folder that more recent iTunes versions try to use. However, the XML database file still had some file paths that were trying to look in the 'iTunes Media' folder, for example:
<key>Location</key><string>file://localhost/D:/Music/iTunes/iTunes%20Media/Black%20Eyed%20Peas/Elephunk/05%20Shut%20Up.m4a</string>
when in fact the correct location should have been:
<key>Location</key><string>file://localhost/D:/Music/iTunes/iTunes%20Music/Black%20Eyed%20Peas/Elephunk/05%20Shut%20Up.m4a</string>

Solution
1. Make a copy of the iTunes Library.xml as a backup
2. Open the iTunes Library.xml using a text editor like Notepad
3. Ctrl+F and search for a track that is missing in VirtualDJ
4. Look at the Location line for that track, and identify which part is incorrect (in the example above, "iTunes%20Media" should have been "iTunes%20Music")
5. Correct the Location address (since mine all had the same problem I used the replace tool (Ctrl+H) to replace "iTunes%20Media" with "iTunes%20Music")
6. Save the XML file
7. Close and reopen VirtualDJ, then and open an iTunes playlist from the sidebar. Your tracks should all be linked and playable, with all cue points etc retained.
 

geposted Sun 24 Jul 22 @ 2:43 am
K0mixPRO InfinityMember since 2012
Ignore the above, iTunes resets the paths in the xml when you next open it. Changing Preferences > Advanced > iTunes Media Folder Location also resets on next launch.

Apologies, I thought I'd found a solution but it appears it's an iTunes bug.
 

geposted Sun 24 Jul 22 @ 5:45 am
K0mixPRO InfinityMember since 2012
Since you cannot change the location of the media folder in iTunes, you have to bend to its will...

The actual solution is to move all your music files to the folder specified in Preferences > Advanced > iTunes Media Folder Location (in the above example, from D:/Music/iTunes/iTunes Music to D:/Music/iTunes/iTunes Media. Fortunately, this still preserves all cues etc in VirtualDJ.
 

geposted Sun 24 Jul 22 @ 11:16 am