Author Topic: File Organizer beauties  (Read 18614 times)

disone

  • Guest
I'm trying to synchronize my file name mask from MediaMonkey with MusicBee. It's quite an adventure!
My mediamonkey sorting rule looks like this:

D:\Audio\$if(<Album Artist>=Various,$if(<Genre>=Top40,Top40,),Artists)\<Album Artist>\(<Year>) <Album>\$if(<Disc#>,<Disc#>-,)$if($len(<Track#>)<3,<Track#:2>,<Track#>) <Artist> - <Title>

I use 3 folders:
\Various (for all compilation albums)
\Artists (for all non-compilation albums)
\Top40 (for the dutch Top40 collection by Spammetje et all)
The $if(<Album Artist>=Various,$if(<Genre>=Top40,Top40,),Artists) makes sure it is sorted correctly. This one is easily translated to MusicBee with <if(<Album Artist>=Various,<if(<Genre>=Top40,Top40,),Artists)>.

Then the $if(<Disc#>,<Disc#>-,) makes sure that if the tag Disc# is filled, the value and an "-" is added. Otherwise skip the Disc#.
Musicbee Translation: <IsNull(<Disc Count>,,<Disc Count>-)>

$if($len(<Track#>)<3,<Track#:2>,<Track#>) makes sure that tracklengths shorter than 3 characters are padded to two. so you'll get 02 instead of 2. Anything longer than 3 is not to be touched. Reason for this is some strange behaviour in Mediamonkey when tracknumbers contain letters (e.g. 125b) and are longer than 2 characters. Mediamonkey would pad the track# to the first two characters as these are numbers and the a is a letter. The result would be 12 opposed to "leave me be 125b".

*EDIT1*
Just tested <Pad(<Track#>,2)> and this works perfect anything smaller than 2 characters is padded to two, anything larger is untouched.
Also track# that contain a single letter (A-z) remain a letter. I use these for anything vinyl (track A, B, AA etc.).
*/EDIT1*

*EDIT2*
Since only the Top40 structure contains more than 100 tracks per album (CD limit is 99) I added the 3 character padding to these files by checking <if(<Genre>=Top40,<Pad(<Track#>,3)>,<Pad(<Track#>,2)>)>

So my current template looks like this:
D:\Audio\<if(<Album Artist>=Various,<if(<Genre>=Top40,Top40,)>,Artists)>\<Album Artist>\"("<Year>")" <Album>\<IsNull(<Disc Count>,,<Disc Count>-)><if(<Genre>=Top40,<Pad(<Track#>,3)>,<Pad(<Track#>,2)>)> <Artist> - <Title>

I know a lot of you have beautiful file naming templates as well. Feel free to post with an explanation of the interesting parts :) So we all can learn...

Cheers,
disone
Last Edit: March 12, 2012, 09:57:06 PM by disone

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34361
i would suggest you replace:
<IsNull(<Disc Count>,,<Disc Count>-)><Pad(<Track#>,2)>
with
<Disc-Track#>
which does the same thing

D:\Audio\<if(<Album Artist>=Various,<if(<Genre>=Top40,Top40,)>,Artists)>\<Album Artist>\"("<Year>")" <Album>\<Disc-Track#> <Artist> - <Title>

<Disc Count> is the total number of discs, so if you were to stick with your old template use <Disc#> instead

disone

  • Guest
You are so right!

I've changed it to
D:\Audio\<if(<Album Artist>=Various,<if(<Genre>=Top40,Top40,)>,Artists)>\<Album Artist>\"("<Year>")" <Album>\<IsNull(<Disc#>,,<Disc#>-)><if(<Genre>=Top40,<Pad(<Track#>,3)>,<Pad(<Track#>,2)>)> <Artist> - <Title> for now.

I'm testing the <Disc-Track#> to see how that one works. Thanks!


disone

  • Guest
Wow! works like a charm!

New one:
D:\Audio\<if(<Album Artist>=Various,<if(<Genre>=Top40,Top40,)>,Artists)>\<Album Artist>\"("<Year>")" <Album>\<Disc-Track#> <Artist> - <Title>
Tested against track#: A, A1, 125b, 1, 78, ZZ.

Thanks!,
Marc

disone

  • Guest
Minor tweak of the folder selection:

D:\Audio\<if(<Album Artist>=Various,<if(<Genre>=Top40,Top40,Various)>,Artists\<Album Artist>)>\"("<Year>")" <Album>\<Disc-Track#> <Artist> - <Title>

Otherwise it would result into d:\Audio\\Various\[etc]. Now it doesn't.

James_LX

  • Newbie
  • *
  • Posts: 2
Hi! I'm kinda confused with this sintax and I here's what I would like to do but don't know how!

I want it to create and put the music files in a "CD#\" subfolder (where # is the cd number) only and only if:
a) There is a disc number in its tag and
b) The total disc count is above 1 (or different than 1, whatever)

How can I do this? Any help?   ???
Thanks in advance, much appreciated!

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34361
\<If(<DiscCount> <=  1,,<IsNull(<DiscNo>,,CD<DiscNo>)>)>\

you need version 2 though as i recall a couple of corrections were made

James_LX

  • Newbie
  • *
  • Posts: 2
\<If(<DiscCount> <=  1,,<IsNull(<DiscNo>,,CD<DiscNo>)>)>\

you need version 2 though as i recall a couple of corrections were made

Thanks a bunch Steven! :)

So basically it says: If <disc count> equals 1 or less, do nothing. Otherwise see if there is a <disc number> at all and if not, do nothing, but if it exists then write: CD<DiscNo>\. Is this correct?
I was getting mixed up with using double quotes, but seems like I don't even have to use them :)

So, I can't do this with the current stable version? Do you know when version 2 is supposed to be released?

Thanks again :)

steelwolf

  • Guest
I've had a heck of a time getting my file structures organized because I have a good deal of classic music, and including information about opus, movement, performer, etc generates ridiculously long filenames. So long, in fact, that filesystems will balk because the total character length of the path is greater than 256.

I addressed this problem in MediaMonkey with a series of variables, as follows:

Main Directory:
F:\Collection\$Assign(F:\Collection\,M)

Subdirectories:
$Assign(D,<Album Artist@1>\$Left(<Album Artist>,50)\$Left(<Album>,50) $if(<Disc#>=2,(Disc <Disc#>$),))$Use(D)

Filename:
$Assign(F,$if(<Track#>,<Track#:2> -,) $Left(<Title>,50))$if($Len($Use(M)+$Len($Use(D))+$Len($Use(F)))<=255,$Use(F),$Left($Use(F),30))

At each step, the output is stored in a variable. At the end, the length of all three variables combined is checked, and if it is STILL greater than 255, the filename gets trimmed from 50 chars to 30 chars.

I seem to be able to recreate just about everything in MusicBee aside from this final check of the total length with the following syntax:

<Group(<Album Artist>,1)>\<Left(<Album Artist>,50)>\<Left(<Album>,50)>\<Isnull(<Track#>,,<If(<Disc Count><=1,<Pad(<Track#>,2)>,<Disc-Track#>)> - )><Title>

Folders are created alphabetically, then by artist (trimmed to 50 chars), then by album (trimmed to 50 chars). If track number is blank, nothing is entered (this prevents files with null track numbers from starting with " - "), otherwise, see if there is more than one disc, if there is, add in disc number (this prevents single-disc albums with "disc 1" metadata from being numbered as though they are part of multidisc sets).

Does a method exist within MusicBee to ensure that the final output is still a valid character length?

l.dc

  • Full Member
  • ***
  • Posts: 164
Obviously you guys have some advanced organisation rules.

Mine is way too simple because I don't like all those songs being around too much (in the case of 'top 40' for example?).

<Year (yyyy)>\<Album>\<Track#>_<Title>

I chose 'Year (yyyy)' instead of the more common 'Year' because the former creates folders only by the year instead of adding the month and day, hence neater looking. :)