Author Topic: Sorting Folders by Release Type  (Read 16510 times)

Sani

  • Jr. Member
  • **
  • Posts: 46
Again, you can use functions as a workaround for this.  I put the non-album tracks in the top level folder.  If you want them to have their own folder, adjust your template accordingly.  Just substitute one of these templates where you have the "<Year> - <Album>" folder.

This will put them in the artist folder:
$IsNull(<Album>,,"\"<Year>" - "<Album>)

This will put them in their own folder:
\$IsNull(<Album>,"Non-album Singles",<Year>" - "<Album>)

I put it like this:

<Album Artist>\<release type>s\<Year (yyyy)> - \$IsNull(<Album>,"Non-album Singles",<Album>)\<Disc-Track#> <Title>

And got this result:



It messing with the release type as you can see Single;Singles

I simply want this

Album Artist > Release Type > Year - Album > Disc-Track# - Title (But if there is non-album singles, it creates non-album signals or just Singles folder)

MusicBee is making me crazy to organize my music.  :(
Heh, that's the nature of the beast.  That being said, I am forever grateful that MusicBee provides this amount of control out of the box.



Yes i know man that this is the one hell of a software but i am a beginner and i don't have much experience with scripting etc.  :(

theta_wave

  • Sr. Member
  • ****
  • Posts: 680

<Album Artist>\<release type>s\<Year (yyyy)> - \$IsNull(<Album>,"Non-album Singles",<Album>)\<Disc-Track#> <Title>

...

I simply want this

Album Artist > Release Type > Year - Album > Disc-Track# - Title (But if there is non-album singles, it creates non-album signals or just Singles folder)
Believe me, starting out with MB last year I didn't know much about scripting at all.  I knew how to navigate around a *nix shell (bash) and had only a few online lectures in java under my belt when I left Mediamonkey for Musicbee last year (Mediamonkey's magic nodes syntax left my head spinning back then) and my initial posts here is a testament to my inexperience (http://getmusicbee.com/forum/index.php?topic=17256.msg101872#msg101872).  However, after figuring out a few things, with the help of MB users and the wiki, and copious amounts of googling to stackoverflow, I think I'm becoming somewhat competent at this but I still have a lot to learn.  Okay enough with that, back to your issue.

1) Try removing the forward slash preceding the $IsNull in your code
2) You can try the $if, $contains and $split functions working together.

Explanation for #2: It says if the tag <release type> contains "; ", then use the tag splitter to keep everything that's to the left of the first "; ", if not then simply return <release type>.  Remember, $if() statements for MB are essentially three parts: test, do this if test is true, do this if test is false.  Here, the test is $contains(<release type>,"; "); its output is either T or F.  If the test returns T, then $split(<release type>,"; ",1).  If the test returns F, then return the value of <release type>.

Code
<Album Artist>\$if($contains(<release type>,"; "),$split(<release type>,"; ",1),<release type>)s\<Year (yyyy)> - $IsNull(<Album>,"Non-album Singles",<Album>)\<Disc-Track#> <Title>
Last Edit: March 21, 2017, 09:01:40 PM by theta_wave

Sani

  • Jr. Member
  • **
  • Posts: 46
After several hours with forum searches and wiki, i managed to get this template (which still isn't complete as i want some more refinements but i'm lost):

$First(<Album Artist>)\$if(<TrackCount>=1,Singles\"("$Date(<Year>,yyyy)")" - $If($First(<Artist>) =<Artist>,<Title>,$Replace(<Artist>,$First(<Artist>),) - <Title>),$If(<DiscCount>>1,<Album> "("$Date(<Year>,yyyy)")"\Disc <Disc#>,<Album> "("$Date(<Year>,yyyy)")")\<Track#> - $If($First(<Artist>)=<Artist>,<Title>,$Replace(<Artist>,$First(<Artist>),) - <Title>))

This is giving this right now:

It created Singles folders inside the Artist folder. It also put year in front of title so it will easy to sort in Windows Explorer. As i will getting lead artists and non-album singles only so it makes sense. But it will be awesome if display other artists in the filename too e.g; No Frauds - Nicki Minaj, Drake & Lil Wayne



Now, for the albums, I want some changes. Firstly i want Years to be appeared before the album so it gets sorted in the Windows Explorer too. Secondly there is no release types in the template right now as i couldn't do it. It's already too complex for me. I want that before actual albums, it create a folder for Albums, Mixtapes, Compilations etc.



The Disc numberings are perfect for me too as it create separate folders for Discs.



Lastly, its putting Compilation Albums in the Various Artists as i have tagged them with Various Artists in Album Artist. I will get Soundtrack (OST) albums too and i want that those create Soundtracks folder inside Various Artists main folder.



I love MusicBee but this naming template is giving me headaches. I am trying for days but stuck to get the organization right. So if someone please write a complete naming template for me according to my requirements. I will be to learn from that too.

Also if there is any suggestions you can put that into naming template too. OR share your full naming templates. Thanks for all the help till now but i am failed.  :(

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
One thing you can do is rather than trying to fit everything into one template, use exceptions.  Create a basic template for most tracks, and then make exceptions for various artists, and soundtracks, and singles, etc.  Copy your basic template and modify the parts you need to.
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

Sani

  • Jr. Member
  • **
  • Posts: 46
One thing you can do is rather than trying to fit everything into one template, use exceptions.  Create a basic template for most tracks, and then make exceptions for various artists, and soundtracks, and singles, etc.  Copy your basic template and modify the parts you need to.

And how exactly i do that in exceptions? I don't get it.

I want that if <Track>=1 then it will take that into Singles folder.

Please guys help me with the complete template so i get it completed and start collecting new music.

theta_wave

  • Sr. Member
  • ****
  • Posts: 680
Exceptions (listed in the file organization menu) are given priority over the main rule (the former are executed first).  I agree with psycho that you should think about unpacking your code and use some of them under exceptions.  Furthermore, I think some of the last code you posted is a little redundant (see the $Date portion).  I am on my phone now, so I cannot really give you any examples at this moment.

Lastly, did you try what I posed earlier?  What organizational scheme do you specifically have in mind?  Did you successfully imported those musicbrainz TYPE tags into musicbee?  If not, did you examine all the audio types that use this tag under tag inspector (can be found in Musicbee's tag editor)?  I had problems importing MediaMonkey custom tags for mp3's until I entered what was shown under tag inspector.

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
And how exactly i do that in exceptions? I don't get it

Look at theta_wave's screenshot, here: http://imgbox.com/A2NiAskv

There are several exceptions listed. (Where it says "except when")
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

Sani

  • Jr. Member
  • **
  • Posts: 46
But guys why are you not sharing or writing a complete template? You know what I want by now. If you do this, I will go from there because right now, if i do one thing right other goes bad.  :(
Last Edit: March 22, 2017, 04:24:47 PM by Sani

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
a) you'll understand it better if you do it yourself

b) I'm actually working on it, but haven't had time to figure it all out yet
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

Sani

  • Jr. Member
  • **
  • Posts: 46
a) you'll understand it better if you do it yourself

b) I'm actually working on it, but haven't had time to figure it all out yet

Well, I will do it myself too from scratch but i need some basic idea. It would be great if you at least give me template to organize according to release types and singles.

Thanks if you're working on it, i hope i will get something soon.

I will working on it tonight a bit. The system is little complex i know in a long run its great as it will give me peace of mind.

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
Another thing you could do to simplify things is create a virtual tag to the effect of:

Title With Other Artists: $If($First(<Artist>)=<Artist>,,$Replace(<Artist>,$First(<Artist>),)" - ")<Title>


So then you could have (check my syntax carefully because I did this on the fly):


$First(<Album Artist>)\<Release Type>\(<YYYY>) - <Album>\$If(<DiscCount>>1,"Disc "<Disc#>"\",)<Track#> - <Title With Other Artists>


Exception: <TrackCount> = 1

$First(<Album Artist>)\Singles\(<YYYY>) - <Title With Other Artists>


Exception: <Genre> = Soundtrack (or however you're distinguishing soundtracks)

Various Artists\(<YYYY>) - <Album>\$If(<DiscCount>>1,"Disc "<Disc#>"\",)<Track#> - <Title With Other Artists>
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

Sani

  • Jr. Member
  • **
  • Posts: 46
Another thing you could do to simplify things is create a virtual tag to the effect of:

Title With Other Artists: $If($First(<Artist>)=<Artist>,,$Replace(<Artist>,$First(<Artist>),)" - ")<Title>


So then you could have (check my syntax carefully because I did this on the fly):


$First(<Album Artist>)\<Release Type>\(<YYYY>) - <Album>\$If(<DiscCount>>1,"Disc "<Disc#>"\",)<Track#> - <Title With Other Artists>


Exception: <TrackCount> = 1

$First(<Album Artist>)\Singles\(<YYYY>) - <Title With Other Artists>


Exception: <Genre> = Soundtrack (or however you're distinguishing soundtracks)

Various Artists\(<YYYY>) - <Album>\$If(<DiscCount>>1,"Disc "<Disc#>"\",)<Track#> - <Title With Other Artists>

I created the virtual tag just like you mentioned, just copied and paste. Unfortunately I got error in namiing template. It's not validating and directory structure is messed up. I modified <YYYY> to <Year (yyyy)> by the way as <YYYY> wasn't also validating.


theta_wave

  • Sr. Member
  • ****
  • Posts: 680
But guys why are you not sharing or writing a complete template? You know what I want by now. If you do this, I will go from there because right now, if i do one thing right other goes bad.  :(
From my perspective, it is due to not knowing what you want exactly.  You mentioned you want the following format:

Album Artist > Release Type (non-album singles, create Singles) > Year - Album > Disc-Track# - Title


Then you starting creating a formula that included <Artist>.  Later you, mentioned this:
Quote
I will get Soundtrack (OST) albums too and i want that those create Soundtracks folder inside Various Artists main folder.

To me, it appears that you are changing your folder scheme on the fly.  It would be helpful to know what exactly you want.  Rather than screenshots, just type out examples of your folder scheme (it doesn't have to be extensive).  Did you to manage to get <Release Type> to display metadata from Picard?  Why did you go from <Albumartist> to <Artist>?

An example of a folder scheme:

1) Regular albums: Album Artist > Release Type (non-album singles, create Singles) > Year - Album > Disc-Track# - Title
2) Soundtracks: VA\???? (I don't know what you want here)

theta_wave

  • Sr. Member
  • ****
  • Posts: 680
I created the virtual tag just like you mentioned, just copied and paste. Unfortunately I got error in namiing template. It's not validating and directory structure is messed up. I modified <YYYY> to <Year (yyyy)> by the way as <YYYY> wasn't also validating.

<Title With Other Artists> doesn't appear to be a valid tag or virtualtag

Sani

  • Jr. Member
  • **
  • Posts: 46
But guys why are you not sharing or writing a complete template? You know what I want by now. If you do this, I will go from there because right now, if i do one thing right other goes bad.  :(
From my perspective, it is due to not knowing what you want exactly.  You mentioned you want the following format:

Album Artist > Release Type (non-album singles, create Singles) > Year - Album > Disc-Track# - Title


Then you starting creating a formula that included <Artist>.  Later you, mentioned this:
Quote
I will get Soundtrack (OST) albums too and i want that those create Soundtracks folder inside Various Artists main folder.

To me, it appears that you are changing your folder scheme on the fly.  It would be helpful to know what exactly you want.  Rather than screenshots, just type out examples of your folder scheme (it doesn't have to be extensive).  Did you to manage to get <Release Type> to display metadata from Picard?  Why did you go from <Albumartist> to <Artist>?

An example of a folder scheme:

1) Regular albums: Album Artist > Release Type (non-album singles, create Singles) > Year - Album > Disc-Track# - Title
2) Soundtracks: VA\???? (I don't know what you want here)

Because i get confused everytime. I will write proper folder scheme examples tonight and send it here. Thanks for bearing with me guys.  :-X