Jump to content

Music Organiser (mp3)


paullab
 Share

Recommended Posts

Something I use to organise/merge music ripped from the various laptops in the house.

what it does is loop through a source directory (as well as any sub-directories)

reading mp3 file properties and copying them into a target directory containing a

very specific directory and file structure.

The source directory can have any structure as we use the file properties to derive

the target structure & file names.

Albumn Artist

--> Albumn

----> Track# - Track Name

I look in 3 places for an artist as sometimes the albumn artist is not populated, or

the contributing artist is populated with the albumn artist

There is some manipulation of ARTIST name to make it easier to filter out errors

in that in all instances the word 'The' is moved to the end.

eg. 'The Who' becomes 'Who, The'

this does NOT happen with albumns or tracks.

Other directory/filename manipulation is as follows:

  • in all instances, if an artist, albumn or track is not available it is replaced with the string 'Unknown'
  • All ocurences of illegal filename characters as well as ,!` are removed
  • instances of & or = are replaced with 'and'
  • _ and - are changed to spaces.
  • any instances of .. are replaced with a .
  • all instances of multiple whitespace is replaced with a single space.
  • everything is changed to Proper Case"/"Title Case"

File Processing is as follows

  • if we do not have the file on our target directory, then we create it.
  • if we already have the file and the new one is of similar length (+- 20 seconds) we take the one with the highest bitrate.
  • if there is more than 20 seconds we take the longer one.
  • lastly, if we have p[rocessed any mp3 files and there is albumn art in our source folder, then that is also processed.

By default a log file is created detailing any new filed created.

detailed logging includes shedloads more, check the code.

this uses a bespoke version of _GetExtProperty() specifically for speed.

NO SOURCE mp3 file is deleted, you will have to do this manually, or change the code.

IMPORTANT

before you use this for real, hit the 'Check ini' button and browse to an mp3 file with known properties.

then use the results displayed to update the ini file and restar the app.

remember that there is a difference between contributing artist (the default presented) and albumn artist

the higher values are nornmally the albumn artist and the lower ones contributing artist/s

Typical ini file contents for Windows 7 (These are NOT the same for vista.)

[Defaults]

Artist=216

Artist1=20

Artist2=13

Albumn=14

Year=15

Title=21

Track=26

Duration=27

Bitrate=28

The original au3 (downloaded 32? times) has been replaced with one that makes it a lot easier when setting setting up the ini file on something that is not Win 7

Music Organiser.txt

Music Organiser.au3

Edited by paullab
Wallpaper Rotatorwith overlay, Loop through a folder of wallpaper & another of overlay, then create a combined image and set it as the wallpaperE-Mail passthru, Send any file, even executables via e-mail as plain text. The recipient can then later re-construct them.Slideshow widget, A slideshow widget similar to the Vista onePredictive typing using the Numpad, Predictive typing using the numpad of a keyboar similar to that on a mobile phone (the key is the .t16 file).PSTools Front End, For Remote Admin. Just makes life a lot easier (Demonstrates executing external programs and passing parameters, tabbed form Handling STDIN/STDERR)FTP Helper application Up and Download files from an FTP server demonstrates this and Tooltray TipsShow a Map of your Post-codes/Zip Codes, Uses the Clipboard, Hotkeys, the system tray (incl. menus)Disc/CD/DVD Catalogue, Ideal for all those Covermount Discs (Demonstrates Array handling, executing DOS programs, handling STDIN/STDOUT recursive directory reads, file searching.)YAST , Yet another Stopwatch/Timer (Uses a hotkey, Copies to clipboard, handles multiple events and stays on top)Keyboard Status Indicator , Indicates status of NumLock, Caps Lock and Scroll Lock Keys, demonstrates API calling & System tray Icon Toggling
Link to comment
Share on other sites

  • 3 years later...

I created an account just to say thanks!

I have been going through the 207gb of unsorted music on my server and belive me it takes FOREVER.

Stumbling across this I tried it on a small amount of music (15gb) and it seems to do the job perfectly!

Thanks for creating this and making it free/open source. I can't wait to look deeper into the script and further my AutoIT knowledge.

Link to comment
Share on other sites

Very good, thanks for sharing. :thumbsup:

Don't know if you approach it the following way or not?

Album Artist does not need to be specified for a track, unless it is different to Track Artist ... as it should by default, be seen as that of the Track Artist.

Typically, you only add Album Artist for Various Artists albums or tracks featuring guest artists.

For a Various Artists album, the Album Artist would be Various ... or more correctly, Various Artist.

Programs like foobar2000 deal correctly with how they display albums, if you stick to those rules.

John Fogerty's new album, which is full of guest artists, has his name as Album Artist for all the tracks featuring guest artists, but not for the few just featuring himself. Each track has a Track Artist, that is either JOHN FOGERTY or JOHN FOGERTY + %guest name% (using plus or ampersand between ... though I try to stick to ampersand in a group name mostly).

That's the rules I abide by anyway.

I also capitalize artist names, for main artist at least, but that's just a visual preference of mine.

I adopted those policies (and others) a few years ago, after many years of frustrating annoyances.

But each to their own I guess.

However, it is annoying that many fill in FreeDB entries with bad spelling, wrong capitalization for titles, missing year, and completely unnecessary information ... and the inclusion of 'The' at the start of an artist name, which I remove altogether ... because for me, it's implied anyway in obvious instances like the Who and the Beatles, and totally unnecessary to my mind for longer names.

Apologies for my little rant, but I like to promote good practice when I can. :D

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Ha Ha, I got right suckered into that one .... just noticed original post date ... jeez! o:)

:ermm::sweating::muttley: :muttley: :P;):D

EDIT

A lot of downloads, and no comment by anyone until today ... hardly seems fair!

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...