News for hackers. Stuff that matters.
Re:The music classifying nightmare by notJim on Saturday September 08, 2012 @07:49PM (#4494437)
This is the shitty python script I use to organize music, which seems to work pretty well except in one case[1]: https://gist.github.com/3681165.

For the love of god, try it on a small sample of your music or it will wreak all kinds of havoc and you will yell and curse my name.

What it does: takes a directory of folders with MP3s, and makes them into the a directory of folders like yourdir/[ARTIST]/[ALBUM]/[TRACK No.] - [Track name].mp3. More importantly though, I believe it handles unicode correctly, and it's just over 100 lines of code, so you could adapt it to whatever system you prefer.

Find the python library called Mutagen that deals with parsing ID3 tags and put it in the same directory as this horrible script.

[1]: The one case it handles spectacularly poorly is when you have an album with multiple artists. This could be a soundtrack, a compilation, or even that thing that happens especially often in rap where the artist is like "[Some dude] ft. [Some other dude]". Honestly, I just handle those cases manually, but it might not be that hard to make the script do it right.

By the way, I've really only run this script on Windows. There are undoubtedly some tweaks that should be made to make it work correctly on Unix-y systems.

Re:The music classifying nightmare by Radix_ on Sunday September 09, 2012 @02:13AM (#4495090)
That's nice, thanks for sharing. I used exfalso, for which mutagen was written, to build a similar directory structure for my music. Mine was "Audio/[ALBUM_ARTIST]else[ARTIST]/[ALBUM]/[TRACK 00]. - [TITLE].mp3" The one thing it did that your script doesn't is it will enter TPE2 if present and backtrack to TPE1. And similar considerations can be entered for adding a disc prefix for multi disc albums. (Since that anachronism is still relevant.) The only problem was I needed to go back through and delete a bunch of empty directories.