I like the convenience of having a music player that manages the placement of my music files based on the tags of the files, sorting into a root music folder with Artist/Album/01 - Track Title.mp3 sort of hierarchy. Previously, I was using Banshee for this feature, as even most of the other gui music players don't have this library management feature.

Now, I've been trying to use console-based applications, and I have been using mpd + ncmpcpp fairly successfully. When I download new music, it is downloaded to a specific folder, and that's not part of my music collection. My previous workflow would be to open a gui filemanager at the downloaded folder, and drag and drop those songs onto banshee, which would then make a copy of those files in my library hierarchy. Currently, I'm doing the same thing, using Banshee only as a sort of import program, then closing it and updating my mpd database, and there we go.

If at all possible, I'd like to automate this to something where I can define a watch folder, and when some magical program sees new music in said watch folder, it identifies the correct place for the files to be copied into my heirarchy, renaming folders and files to the correct format.

I know I've written a lot describing, but I don't actually think this too uncommon a task, and I'm wondering if anyone has a solution for my problem. Thanks.

link|improve this question
I don't know, but I am pretty sure something like that could be scripted with Python. – Keith May 31 '11 at 9:23
Agreed, python and inotify would do the trick. – brice Jun 3 '11 at 18:58
feedback

3 Answers

I modified Ned Batchelder's Python class to rename and sort MP3 files by folders according to artist and album data embedded in ID3 tags.

It can be found here: http://code.activestate.com/recipes/576811-rename-mp3-files-from-id3-tags/

To enable directory creation the script should be invoked with the -d switch, i.e.:

id3rename -d

It should be trivial to update the script to use the genre as a folder name. You will need to use the 'TCON' MP3 frame instead of 'TALB' which is the album name.

You will need to change line 694 in the script to add the value of id3r.getValue('genre') to the line with mp3dir_full = os.path.join(....

ps. If you know Python, I would recommend using instead the mutagen library which much more mature.

See http://en.wikipedia.org/wiki/ID3 for a complete list of the ID3 tags.

link|improve this answer
feedback

Maybe id3ren can help you. This tool can automatically rename files according to their ID3 tags, so you can run it over your 'Music Downloads' directory and have its content renamed and moved to appropriate place.

link|improve this answer
feedback

You can use Python script to do this,If you know python I can help you out.You can obviously use shell script.

link|improve this answer
1  
It should be in comment. – crucified soul Jun 1 '11 at 8:09
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.