getmusicbee.com

Support => Questions => Topic started by: josephzitt on November 23, 2017, 02:29:30 AM

Title: Rearrange filesystem by Sort Album Artist?
Post by: josephzitt on November 23, 2017, 02:29:30 AM
This might be an extraordinarily hazardous idea... but is there a way to have MusicBee reorganize my drive by Sort Album Artist (or by Sort Artist if an album doesn't have an Album Artist)? Right now, everything is alphabetized by the first names of Album Artists, which is maddening.
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: psychoadept on November 23, 2017, 03:04:12 AM
Sure!  Check out these pages for how to customize your file organization:

http://musicbee.wikia.com/wiki/File_Organization
http://musicbee.wikia.com/wiki/Templates
http://musicbee.wikia.com/wiki/Functions
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: josephzitt on November 23, 2017, 03:51:18 AM
So if I understand this correctly, I would want to go to Organize Library Files and set the Naming Template to something like
$If(<Sort Album Artist>,<Sort Album Artist>,<Sort Artist>)\$If(<Year>,<Year> )<Sort Album>\<Disk-Track#> <Title>
to get results like
Gilmour, David\1984 About Face\01 Until We Sleep
?
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: psychoadept on November 23, 2017, 05:42:52 AM
I think you want $IsNull rather than if, in your example.  $If requires specific criteria, like $If(<Sort Album Artist> = "Beatles, The",,)


Try this:

$IsNull(<Sort Album Artist>,<Sort Artist>,<Sort Album Artist>)\$IsNull(<Year>,,<Year>" ")<Sort Album>\<Disk-Track#> <Title>


Also, bear in mind that <Sort Album Artist> probably defaults to <Sort Artist> if there's no Album Artist value, so the first part may be redundant.  I suggest trying different things in the File Organization window and seeing what the preview looks like.
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: redwing on November 23, 2017, 06:58:20 AM
This can avoid such an issue that sort-tags in virtual tags show original tag values when it's null.

$If(<Sort Album Artist>=<Album Artist>,<Sort Artist>,<Sort Album Artist>)
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: josephzitt on November 23, 2017, 04:12:32 PM
The more I work with this, the more confused I get.

I set the value for my F: drive, where my files are now, to
$IsNull(<Sort Album Artist>,<Sort Artist>,<Sort Album Artist>)\$IsNull(<Year>,,<Year>" ")<Sort Album>\<Disk-Track#> <Title>
It appears to tell me that it has only done so for one artist, though I had no artists selected. And when I look at the artist's folder on the drive, nothing has been done.

What am I missing?
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: psychoadept on November 23, 2017, 07:19:48 PM
Could you give us a screenshot of the preview window?
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: josephzitt on November 24, 2017, 01:46:35 AM
OK, assuming this is what you mean, here is some of my preview.
https://imgur.com/a/MgAcA
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: psychoadept on November 24, 2017, 02:20:43 AM
Thanks, that's what I had in mind.  What values are given for Sort Artist, Sort Album Artist, Sort Album, and Year in the Tag Editor for each of the albums shown ("e" and "Flux by Belew, Volume One")?
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: josephzitt on November 24, 2017, 02:36:05 AM
For the album "e":
Sort Artist: Belew, Adrian
Sort Album Artist: Belew, Adrian
Sort Album: e
Year: 2009

For the album "Flux by Belew, Volume One"
Sort Artist: Belew, Adrian
Sort Album Artist: Belew, Adrian
Sort Album: Flux by Belew, Volume One
Year: 2016
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: redwing on November 24, 2017, 11:52:26 AM
It looks like a bug. Try changing the first rule to F drive and second to C drive (it will say something, just ignore it). It seems it only responds when the first rule changes.

Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: josephzitt on November 24, 2017, 07:23:34 PM
OK. Hmm, I have a feeling that I shouldn't be seeing this and that I may have missed something.
https://imgur.com/a/AkcLF
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: psychoadept on November 25, 2017, 04:05:31 AM
OK. Hmm, I have a feeling that I shouldn't be seeing this and that I may have missed something.
https://imgur.com/a/AkcLF

Yep, there's something not right.  If you can't find the issue, click the ... after the naming template and post that screen.

Also check your Filename Character Mapping for "<" and ">"
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: josephzitt on November 25, 2017, 04:44:20 AM
I see that, after the system rebooted itself while I was away. and I restarted MusicBee, the fields are again showing "no change".
Here's what pressing the "..." shows: https://imgur.com/a/IkEJQ
Here's what Filename Char Mapping shows: https://imgur.com/a/HSyMo
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: psychoadept on November 25, 2017, 06:05:38 AM
I think the results reverted because your settings reverted.

I'm not seeing a problem with the formula, but what happens if you press the preview button?
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: josephzitt on November 25, 2017, 06:23:47 AM
This loooks like a failure: I get
FAIL @ "um>\<Disk-Track#> <Title>"
https://imgur.com/a/aGG6e

Another small annoying issue: when I Alt-Tab away from MusicBee to type in the error, the Template Editor window closes. I had to reopen it and do the Preview several times to write down the error here, since I also can't select the text.
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: psychoadept on November 25, 2017, 06:35:53 AM
Yeah, unfortunately those messages are rarely enlightening.  My best guess is that it's not recognizing one of the tags for some reason, but without being able to fiddle with it myself, it's hard to say.

What I would do at this juncture is start back with your original formula and change it one piece at a time, previewing at each stage to see where the error comes in. For instance, what happens if you just change Album Artist to Sort Album Artist, without introducing $IsNull into the equation. 
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: josephzitt on November 25, 2017, 07:09:50 AM
Ah! OK, I went through it bit by bit, and saw that the error kept happening right before
<Disk-Track#>
I removed it, and added what appeared to be the same thing from the list -- but it was
<Disc-Track#>
The "c" rather than the "k" was what was throwing it off.
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: redwing on November 25, 2017, 10:24:51 AM
@Steven;

It seems auto-organization dialog responds only when the first rule changes.
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: Steven on November 25, 2017, 05:26:22 PM
It seems auto-organization dialog responds only when the first rule changes.
i cannot reproduce any issues. Are you certain it wasnt some other rule that was matching
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: redwing on November 25, 2017, 05:43:56 PM
I have MB installed on C drive (also library) and have Music files folder on D drive.
I have from D to D rule as first, and from C to D as second rule.
If I make any changes to the first rule's template, the new filenames immediately show up.
But if I have C to D as first, D to D as second, making any changes to the second rule's template has no effect.
I just tried it one more time to confirm.
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: psychoadept on November 26, 2017, 12:20:53 AM
Ah! OK, I went through it bit by bit, and saw that the error kept happening right before
<Disk-Track#>
I removed it, and added what appeared to be the same thing from the list -- but it was
<Disc-Track#>
The "c" rather than the "k" was what was throwing it off.

Aha!  A tricky one.  Glad you found it.  :)
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: josephzitt on November 26, 2017, 01:38:27 AM
This all worked quite well. Except...

I had the option selected to move the remaining non-music files. In doing the folder moves, MusicBee *copied* the non-music files but didn't move them. I'm not going though by hand and having to remove the folders that remain solely because there are redundant non-music files in them. It's hundreds if not thousands of folders, so I hope this can be fixed for the next person.
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: redwing on December 20, 2017, 07:33:55 AM
I just tried to reproduce this bug with a fresh installation with the latest 3.2 patch and noticed a very strange bug.

The auto-organization dialog doesn't list any track. But clicking or mouse highlighting over "drive" box or "folder" box sometimes makes the file list show up. If I reopen dialog, it's empty again. But if click on the empty dialog, the proceed button gets activated still with no files. Looks like some display bug.


Disregard the above. It was just a complicated template caused a delay in displaying new filename. With a simple template it's working fine.
Title: Re: Rearrange filesystem by Sort Album Artist?
Post by: redwing on December 20, 2017, 08:07:21 AM
I have MB installed on C drive (also library) and have Music files folder on D drive.
I have from D to D rule as first, and from C to D as second rule.
If I make any changes to the first rule's template, the new filenames immediately show up.
But if I have C to D as first, D to D as second, making any changes to the second rule's template has no effect.
I just tried it one more time to confirm.

But the bug is still there.

(https://i.imgur.com/BZFkwrU.png)