Unlike a lot of people, I strangely like to have my individual non-mixed tracks located in one flat folder and any mixes (such as Ministry Of Sound mix albums, etc…) go into another folder sorted by Albums in separate folders. I also embed all of my MP3s with the album art from the album it is from so they are fully portable across a multi-tude of systems.
Therefore, I want my original system kept as is for me, but software like Windows Media Center annoyingly requires you to have it structured in the ‘Album Artist -> Album’ directory structure with the album art stored as ‘Folder.jpg’.
I will not be ranting about how rubbish that required structure is on a technical level; I have got over that now :). But instead, I wrote a PERL script that runs on my Linux NAS that does the following:
- Only runs on Linux – if anyone wants to code link support in for Windows / NTFS partitions, please go ahead and mail back the changes.
- Scans a directory (–mp3dir) (recursion is optional using –recursive) for MP3s / M3U playlists and creates softlinks pointing back to the original files under the ‘Album Artist\Album’ folder structure within –linksdir.
- The embedded album art is then checked across the album being processed to ensure it is the same – if not, a Warning is output leaving you to fix it. The embedded album art is created as ‘Folder.jpg’ for Windows Media Center.
- If you want it to delete soft links for tracks / directories that no longer exist in –linksdir (i.e. if you have moved / renamed the original file), you can use –delnonexists.
- On the off chance you want the –linksdir within the directory structure of –mp3dir, you can use –excludemp3dir to ensure the –linksdir isn’t double scanned.
- For the first run, I strongly recommend not using the –createlinks switch so you can view any errors you may get.
- You need to have the library MP3::Tag installed for this to run – you can get this from CPAN.
www.flumps.org/mp3z/tagging