getmusicbee.com

Support => Questions => Topic started by: Steven on April 14, 2017, 09:06:01 PM

Title: Custom sorting
Post by: Steven on April 14, 2017, 09:06:01 PM
With recent builds of v3.1, MB can use file sort tags to override the default sorting of files in the main panel. While I am reasonably OK with that, I think where things become ambiguous and inconsistent is for showing items in the filter panels for files with multiple artists.
For example a file might be tagged:
DisplayArtist: aaaaa ft. zzzzzz
Artist1: aaaaa
Artist2: zzzzzz
SortArtist: xxxxx
In the main panel, the file will sort as xxxxx but for the filter panels it doesnt make sense to use the sort artist ie. zzzzz should not be sorted as xxxxx. There might also be scenarios where SortArtist hasnt been entered for some of the files in the Album.

Rather than having MB do guess work eg. only use the sort artist on Artist1, I am considering changing the behavior so that rather than using file tags to determine custom sort values, instead MB will have a dialog where you can enter a mapping bwetween Artist and the custom sort value. I guess file tags can be used to initialise that mapping list.
So the mapping table might have:
Artist: aaaaa    Sort Artist: xxxxx
So mappings are explicity stated and handling for splitting multiple artist files is clear.

Any comments welcome. I havent decided on this
Title: Re: Custom sorting
Post by: tanstaafl on April 14, 2017, 09:46:06 PM
Isn't the root problem that the artist tag can be split, but sort artist can't be split? (And shouldn't album artist and sort album artist be treated exactly like artist/sort artist?)
Title: Re: Custom sorting
Post by: psychoadept on April 14, 2017, 09:51:14 PM
I love this concept!  I would find it most useful with Sort Composer, I think.
Title: Re: Custom sorting
Post by: Bee-liever on April 15, 2017, 01:32:05 AM
If this could be implemented as an additional override to the current sorting tags, than I think it would be a good idea.
Using the "Weird Al" Yankovic sorting problem from earlier:
solo album entires under Sorting tab would have;
album artist: "Weird Al" Yankovic
sort as: Weird Al Yankovic
artist: "Weird Al" Yankovic
sort as: Weird Al Yankovic
as it's currently done and you don't need to do anymore.

the "Weird Al" Yankovic and Wendy Carlos album would need to have the mapping function;
album artist: "Weird Al" Yankovic; Wendy Carlos
"Weird Al" Yankovic > map as: Weird Al Yankovic
Wendy Carlos > map as: Wendy Carlos
artist: "Weird Al" Yankovic and Wendy Carlos
"Weird Al" Yankovic > map as: Weird Al Yankovic
Wendy Carlos > map as: Wendy Carlos
Title: Re: Custom sorting
Post by: Steven on April 15, 2017, 10:02:10 AM
Isn't the root problem that the artist tag can be split, but sort artist can't be split? (And shouldn't album artist and sort album artist be treated exactly like artist/sort artist?)
yes that is the main issue and the proposal i made is one way to address that issue
and yes Sort/Album Artist/ Album could be treated the same way, although multiple values for the one file generally doesnt apply for Album Artist and certainly not for Album, so Album Artist and Album could keep using the file sort tag values, while Artist and Composer could use the proposed mapping functionality.

For now, I am going to disable the new sorting for the filter panels and allow more time for thoughts/comments
Title: Re: Custom sorting
Post by: Steven on April 16, 2017, 02:54:52 PM
I have started implementing the functionality to specify a mapping between artist name and sort value that is independent of tagged files but I am looking for further comments.

I will keep the following to artist names but it also applies to albums and composers.

Some of the problems with having file tag based sort mappings as i see it are:
- musicbee supports multiple artists per file which iTunes doesnt
- there is no standard for tagging multiple sort artists ie. only a single sort artist for a single file
- and even if a file based solution was implemented, its difficult to maintain mappings for indiviuals as the individuals can vary from track to track
- because the sort mapping if file based, you can easily end up with situations that some files have sort tags and others dont, leading to albums being split inconsistently in the main panel and duplicate entries in the filter panels
- and when splitting multiple artists from a single file, it only makes sense to use the file sort artist if there is one artist, but again that can lead to inconsistencies eg. file1 has one artist AAAA that is mapped to ZZZZ but file2 has multiple artists where artist AAAA is a secondary artist and hence the sort mapping is undefined

If any of the above is not clear, let me know and i will provide examples

So i am considering only using sort mapping rules that are implemented in musicbee eg. you define artist AAAA as mapped for sorting to ZZZZ once and all instances of AAAA are mapped to ZZZZ. As mentioned its no problem to import the existing file based sort tags to initialise the mapping. I guess the new Sort tab on the tag editor could remain and it would upate the file tags but also update the sort mapping in musicbee - the musicbee mapping would be the "golden source" if that makes sense

Any thoughts or issues with this?
Title: Re: Custom sorting
Post by: Steven on April 17, 2017, 09:13:09 PM
This is done now as described above. I will make it available in the next day after some more testing
Title: Re: Custom sorting
Post by: Steven on April 20, 2017, 09:30:46 PM
http://musicbee.niblseed.com/V3_1/MusicBee31_Patched.zip

I should mention you can edit the sort mappings from the Preferences/ Sorting/ Grouping tab
and still edit the sort mappings in the Sorting tab in the tag editor
Title: Re: Custom sorting
Post by: tanstaafl on April 20, 2017, 11:30:19 PM
Well, I'm still seeing the column browser sorting-order issue I noted in my other thread:
Quote
For example, I have albums by "Joan Jett" (sort tag "Jett, Joan") and "Joan Jett and the Blackhearts" (sort tag "Jett, Joan and the Blackhearts"). In the main view "Joan Jett" shows up before "Joan Jett and the Blackhearts" while in the column browser "Joan Jett" shows up after "Joan Jett and the Blackhearts". I would expect the column browser to show "Joan Jett" before "Joan Jett and the Blackhearts"

A more complex (and perhaps unsolvable) case is this: For both "Miami Sound Machine" and "Gloria Estefan and Miami Sound Machine" I have the sort tag set to "Miami Sound Machine". In the main view, the albums mix together, sorted by album, and displaying the proper album artist with each. In the column browser, it shows "Gloria Estefan and Miami Sound Machine" after "Miami Sound Machine". I'd expect it to sort as "Gloria Estefan and Miami Sound Machine" before "Miami Sound Machine" (but I can see where this scenario is fundamentally ambiguous).

I have multiple examples of short/long album artist names reversed in the column browser. E.g., "Alan Parsons" (sort tag "Parsons, Alan") after "The Alan Parsons Project" (sort tag "Parsons, Alan Project, The") instead of before.

However, for "Steve Morse" and "Steve Morse Band" I have the sort-tag, and the mapping, since it was initialized from the sort tags, set to "Morse, Steve" and for these, "Steve Morse" shows up before "Steve Morse Band" in the column browser.

Also - it appears that I can't clear a sort tag in the tag editor. When I clear the field, the sort tag fills back in in gray, as expected. But when I click "Save" it seems that nothing happens, as when I edit again the sort tag is still there.
Title: Re: Custom sorting
Post by: Steven on April 22, 2017, 03:15:53 PM
The sort values used are as configured in the Sorting and Grouping preferences tab. You can edit them via the tag editor but ultimately thats where the sort values now come from. When a file is displayed in the main panel, its the album artist or displayed artist that determines which sort value is used. For items in the column browser its the individual artist value that determines which sort value is used. Often the individual artist is the same as the display artist and hence the same sort value is used. But if the individual artist is not the same as the display artist then you need two sort mappings defined.

This is the fix for the tag editor bug:
http://musicbee.niblseed.com/V3_1/MusicBee31_Patched.zip
Title: Re: Custom sorting
Post by: tanstaafl on April 22, 2017, 06:31:25 PM
The problem isn't with the tags or the mappings. They are correct, and in the main view they sort correctly. However, in the column browser, "XXXX abcd" is sorted before "XXXX" not after it, as it is in the main view.

For example "Jett, Joan and the Blackhearts" shows up BEFORE "Jett, Joan" in the column browser, but AFTER in the main view. After is correct, IMHO.

Also - in the tag editor you have to manually click the checkbox for the sort tags; for other tags, it's checked automatically when you edit the text box. But when I check the box manually, I can clear the tag and save it.
Title: Re: Custom sorting
Post by: Steven on April 22, 2017, 08:04:56 PM
For example "Jett, Joan and the Blackhearts" shows up BEFORE "Jett, Joan" in the column browser, but AFTER in the main view. After is correct, IMHO.
can you show me a screenshot of the Preferences/ Sorting & Grouping/ sorting/ Artists dialog where you have explictly set (I assume)
"Joan Jett and the Blackhearts" to sort as "Jett, Joan and the Blackhearts"
"Joan Jett" to sort as "Jett, Joan"
Title: Re: Custom sorting
Post by: tanstaafl on April 22, 2017, 08:42:34 PM
Here you go...

Main window, showing column browser and main view with the two in different orders (http://imgur.com/bc2ti2Q)

Mapping window (http://imgur.com/6e6Be8w)

Sort tags on Joan Jett album (http://imgur.com/cNkLVt8)

Sort tags on Joan Jett & the Blackheats album (http://imgur.com/3JVPkHV)
Title: Re: Custom sorting
Post by: Steven on April 23, 2017, 01:43:14 PM
i am going to need your settings file - help/ support/ view settings
Title: Re: Custom sorting
Post by: tanstaafl on April 23, 2017, 02:39:23 PM
PM sent. Let me know if you have any problems opening it.
Title: Re: Custom sorting
Post by: Steven on April 23, 2017, 03:44:37 PM
thats fixed now:
http://musicbee.niblseed.com/V3_1/MusicBee31_Patched.zip
Title: Re: Custom sorting
Post by: tanstaafl on April 23, 2017, 03:50:05 PM
Confirmed. Thanks for the quick turnaround.
Title: Re: Custom sorting
Post by: psychoadept on May 01, 2017, 06:39:40 AM
This is behaving inconsistently for me.  Here's a gif of an entire album, where only the composer and title values change.  Yet for some reason the button for custom sort mapping only appears on a few tracks:

(http://i.imgur.com/eFxQFZ3.gif)
Title: Re: Custom sorting
Post by: Bee-liever on May 01, 2017, 07:45:44 AM
I think it only shows if there is inconsistencies in the data base that needs fixing
Title: Re: Custom sorting
Post by: Steven on May 01, 2017, 07:47:21 AM
This is behaving inconsistently for me.  Here's a gif of an entire album, where only the composer and title values change.  Yet for some reason the button for custom sort mapping only appears on a few tracks:
you can always edit them from the Sorting & Grouping preferences dialog.
In the tag editor, the edit button currently only appears if there are individuals associated to the file that cant be edited in the tag editor Sorting tab
Title: Re: Custom sorting
Post by: Faskil on May 06, 2017, 06:10:18 PM
Don't know if I'm doing something wrong, but since the last update, the left pane with the albums is not sorted anymore when I choose "Album". Or at least not in a way that makes sense. See here (https://www.dropbox.com/s/j7oudzdr4g0pcoo/MusicBee_2017-05-06_19-08-26.png?dl=0).

Is there a way to fix this or roll back to the previous sorting method, which worked fine for me?

Title: Re: Custom sorting
Post by: Steven on May 06, 2017, 06:23:12 PM
Don't know if I'm doing something wrong, but since the last update, the left pane with the albums is not sorted anymore when I choose "Album". Or at least not in a way that makes sense. See here (https://www.dropbox.com/s/j7oudzdr4g0pcoo/MusicBee_2017-05-06_19-08-26.png?dl=0).

Is there a way to fix this or roll back to the previous sorting method, which worked fine for me?
it looks like a bug so i will fix it
Title: Re: Custom sorting
Post by: Faskil on May 06, 2017, 06:30:43 PM
it looks like a bug so i will fix it
Sweet, thanks!
Title: Re: Custom sorting
Post by: Steven on May 06, 2017, 06:40:43 PM
http://musicbee.niblseed.com/V3_1/MusicBee31_Patched.zip

unzip and replace the existing files where MB is installed
Title: Re: Custom sorting
Post by: Faskil on May 06, 2017, 06:44:39 PM
Awesome, it works! Thanks for the quick fix. ;)
Title: Re: Custom sorting
Post by: josephzitt on May 07, 2017, 02:44:09 AM
So, if I understand this correctly, setting the Sort Album Artist in the Edit > Sorting tab will now automatically change the setting for all instances of that artist in the Library? If so, wonderful!
Title: Re: Custom sorting
Post by: antietam on May 08, 2017, 12:16:13 PM
Will you be so kind to keep a very useful feature introduced in ver. 3.1.6312 - "ignore sort override tags" (Sorting/Grouping) - in new versions, too?

Old habits die hard :)
Title: Re: Custom sorting
Post by: Steven on May 08, 2017, 07:24:55 PM
Will you be so kind to keep a very useful feature introduced in ver. 3.1.6312 - "ignore sort override tags" (Sorting/Grouping) - in new versions, too?

Old habits die hard :)
i have put something in for the next v3.1 update
Title: Re: Custom sorting
Post by: psychoadept on May 08, 2017, 07:37:51 PM
My library has had some weird automatic applications of this (like all "Garrison Keillor" tracks were suddenly sorted as "Willie Nelson"), but they've been easy enough to fix.  I'm just wondering how we tell what's actually in the sort tags in the files (for compatibility with other software) vs MusicBee's internal sorting.  I mean, without looking at the tag inspector for each individual file
Title: Re: Custom sorting
Post by: Steven on May 08, 2017, 07:49:54 PM
My library has had some weird automatic applications of this (like all "Garrison Keillor" tracks were suddenly sorted as "Willie Nelson"), but they've been easy enough to fix.  I'm just wondering how we tell what's actually in the sort tags in the files (for compatibility with other software) vs MusicBee's internal sorting.  I mean, without looking at the tag inspector for each individual file
On the initial scan when the sort artists mapping was automatically created, I guess it only takes one file with "Willie Nelson" to cause "Garrison Keillor" to have that mapping or perhaps it was from a rougue sort artist and you might use sort album artist.
In any case i was think of creating a Tagging Tools sort tag inconsistencies report for this purpose. Also i might disable the new sorting functionality by default for new users for this very reason to save a bunch of new "bug" reports.
As long as you edit the sort tags the same way as before via the tag editor, MB should keep them in sync
Title: Re: Custom sorting
Post by: psychoadept on May 08, 2017, 08:07:02 PM
In any case i was think of creating a Tagging Tools sort tag inconsistencies report for this purpose.

This sounds great!

Quote
Also i might disable the new sorting functionality by default for new users for this very reason to save a bunch of new "bug" reports.

Maybe a pop-up when they upgrade, explaining the change?  Or offering to activate it?

Quote
As long as you edit the sort tags the same way as before via the tag editor, MB should keep them in sync

You mean in terms of editing individual files?  When would they not be in sync?
Title: Re: Custom sorting
Post by: Steven on May 08, 2017, 10:08:50 PM
In any case i was think of creating a Tagging Tools sort tag inconsistencies report for this purpose.
http://musicbee.niblseed.com/V3_1/MusicBee31_Patched.zip
Title: Re: Custom sorting
Post by: redwing on May 17, 2017, 06:03:55 AM
I keep sort tag in my music files only for classical music composers, but this feature now allows to use sort artist/composer without adding such tags to files.
But the problem is the list has to be edited manually if you don't have such file tags.
- Why not support using functions?
Then the user could enter a formula, the list gets updated populating new values, and the user ticks each "exception" box for band name that changes the sort value to the original, or overwrites sort values manually for some which turns on exception mark.
- Make these values an MB-internal tag so that they can be copied, edited, stored, and compared with other tags in main panel.
- Also support album artist list too in addition to the current artist and album list.
- Another issue is artist thumbnail which does not work currently. If MB already knows sort values of artist through this list, why not re-use thumbnails for original artist/composer for their sort values as well?
Title: Re: Custom sorting
Post by: Steven on May 17, 2017, 07:14:00 AM
i wont comment on your other proposals just yet but for this:
- Another issue is artist thumbnail which does not work currently. If MB already knows sort values of artist through this list, why not re-use thumbnails for original artist/composer for their sort values as well?
Are you showing Sort Artist as opposed to showing Artist (where its sorted by sort artist)
Title: Re: Custom sorting
Post by: redwing on May 17, 2017, 07:20:46 AM
Mostly using Artist which shows thumbnails fine. But with Sort Artist, it doesn't use those original thumbnails.
Title: Re: Custom sorting
Post by: psychoadept on May 25, 2017, 04:45:31 AM
I'm having problems with this because I prefer artists sorted by first name, but composers sorted by last name.  So if an artist is also a composer, they will end up sorting in the wrong place.  Any chance of treating them separately?  Or is there some way I can hack it so this doesn't happen?
Title: Re: Custom sorting
Post by: Steven on May 25, 2017, 09:10:50 PM
I'm having problems with this because I prefer artists sorted by first name, but composers sorted by last name.  So if an artist is also a composer, they will end up sorting in the wrong place.  Any chance of treating them separately?  Or is there some way I can hack it so this doesn't happen?
for the next update i have added in the ability to explicity mark a sort mapping to apply to composers only. Just prefix the composer variation with "composer:"
eg.
John Smith                    Smith, John
composer:John Smith      John Smith
Title: Re: Custom sorting
Post by: Steven on May 25, 2017, 09:39:47 PM
http://musicbee.niblseed.com/V3_1/MusicBee31_Patched.zip
Title: Re: Custom sorting
Post by: psychoadept on May 25, 2017, 11:16:03 PM
Awesome, thanks!
Title: Re: Custom sorting
Post by: psychoadept on May 27, 2017, 02:22:34 PM
The Composer trick is working great.

However, something is causing sort values not to be saved when entered in the pop-up list.  It doesn't happen 100% of the time, but fairly consistently.  Here's a GIF:

(http://i.imgur.com/8R81QPE.gif)
Title: Re: Custom sorting
Post by: Steven on May 27, 2017, 03:17:37 PM
thats fixed now:
http://musicbee.niblseed.com/V3_1/MusicBee31_Patched.zip
Title: Re: Custom sorting
Post by: psychoadept on May 27, 2017, 04:37:15 PM
Confirmed, thanks!
Title: Re: Custom sorting
Post by: psychoadept on May 27, 2017, 11:36:56 PM
Another detail... hopefully the last...

Right now I have a LOT of entries like this:

(http://i.imgur.com/zgy752i.png)

(!) says this:

(http://i.imgur.com/QodGB8t.png)

There's a sort composer value entered, based on tags, but it hasn't been applied to the thumbnail browser, and resaving isn't enough to apply it.  I actually have to delete, save, and reenter it, or use the popup to make it work.  If there's a sort composer value in tags, shouldn't it automatically be applied as composer:etc...?

Also, if I go into the pop-up and enter the sort composer I want, with "composer:", it is applied correctly but the sorting tab just shows the regular name, which is a little disconcerting, especially since once you save the value, there's no way to access it again from the Sorting tab.  It doesn't show up in the Sort As box, and there's no button for the pop-up - or if there is a popup due to other tags, the "composer:" entry isn't shown there, anyway.

I would expect that if there's a "composer:" sort value, it would be shown in the "sort as" box for composer, and that if you enter a value in "sort as" for composer it should either automatically be turned into "composer:" or there should be a way to indicate that you want to do that.  And if not that, it should at least definitely show up in the pop-up list.


Oh, and a tiny but irritating bug: you can't enter a space in the Composer field on the Sorting tab.  As soon as you press Space, the cursor jumps to the beginning of the field.  So you have to go to the main tab to enter a composer.

Edit: One more bug I've come across - it's possible to trigger the save & go to next hotkey while you have the "edit custom sort values" pop up open.
Title: Re: Custom sorting
Post by: Steven on May 28, 2017, 09:15:28 AM
There's a sort composer value entered, based on tags, but it hasn't been applied to the thumbnail browser, and resaving isn't enough to apply it.  I actually have to delete, save, and reenter it, or use the popup to make it work.  If there's a sort composer value in tags, shouldn't it automatically be applied as composer:etc...?
MusicBee only uses the custom sort mappings as defined in the Sorting/Grouping preferences and no longer uses the sort tags as the primary means of sorting artists and albums. I gave a detailed explaination for the reasoning for that, probably near the start of this topic and it relates to MB allowing multi-value artists which iTunes doesnt.

The first time a user starts MB with this new functionality, MB will scan existing files for the sort tags and automatically build up a default mapping. Looking at the code i realise now it only did that for music library file and not files from the Inbox so i will change that. Additionally MB scans new files added to the library and creates new custom sort mappings when needed.
The reason i have left sort fields in the tag editor is so users can maintain updating those tags for other applications that might use them. Editing the sort mapping values via the tag editor does update the MusicBee sort mappings

Specially to the ! message, i expect it really is the case George Winston is not defined as a custom artist mapping. As "George Winston" doesnt need to set as "composer:George Winston" - the composer: prefix is only needed if George Winston also was set in the artist field and you wanted it sorted differently.
edit: Actually there might have been a bug in your case with the ! validation. Try again with the new verson when its available before doing the next steps below.

If you have a lot of inconsistencies and are confident the sort tags in your files are correct, you could force MB to reload the artist and album mappings by closing down MB, and editing MusicBee3Settings.ini and removing these (keep the text somewhere in case you decide you want to restore the old mappings
Code
<ArtistSortMapping>...</ArtistSortMapping>
<AlbumSortMapping>...</AlbumSortMapping>
on the next restart MB will rebuild the initial sort mappings


edit:
the couple of bugs around the handling for "composer:xxxx" not being reflected in the tag editor after updating the "Edit Custom Sort Values" dialog are fixed for the next update
Title: Re: Custom sorting
Post by: Steven on May 28, 2017, 02:04:21 PM
this has the new behaviour as described above:
http://musicbee.niblseed.com/V3_1/MusicBee31_Patched.zip
Title: Re: Custom sorting
Post by: psychoadept on May 28, 2017, 05:15:18 PM
Thanks!  At a glance, it's much more as expected now.  The "composer:" entries are showing up in the sorting pop-up, and in the composer "sort as" field.  That was the biggest issue.

Quote
Specially to the ! message, i expect it really is the case George Winston is not defined as a custom artist mapping. As "George Winston" doesnt need to set as "composer:George Winston" - the composer: prefix is only needed if George Winston also was set in the artist field and you wanted it sorted differently.
edit: Actually there might have been a bug in your case with the ! validation. Try again with the new verson when its available before doing the next steps below.

I'm still seeing that message.  George Winston doesn't have a custom Artist/Album Artist mapping, as you say.  There is a Sort Composer tag in the file, but NOT a Sort Artist/Sort Album Artist value, which is how I was handling this previously.  Anyway, if MusicBee can't automatically read that as a "composer:" sort, I'm going to have to manually do them all anyway, so probably not worth worrying about the message.
Title: Re: Custom sorting
Post by: Steven on May 28, 2017, 05:25:37 PM
Anyway, if MusicBee can't automatically read that as a "composer:" sort, I'm going to have to manually do them all anyway, so probably not worth worrying about the message.
i also put some logic in so when a new file is scanned, if the composer name is the same as the artist in that file then MB will assign the composer sort value as "composer:XXXX".
Title: Re: Custom sorting
Post by: psychoadept on May 28, 2017, 05:32:42 PM
i also put some logic in so when a new file is scanned, if the composer name is the same as the artist in that file then MB will assign the composer sort value as "composer:XXXX".

Sweet!
Title: Re: Custom sorting
Post by: chrswrn on October 23, 2018, 11:33:30 PM
Picking up an old thread here - I think my current problem is relevant.

Taking one album as an example, I'll use:

Album: Good Morning To The Night
Album Artist: Elton John; Pnau
Year: 2012

I split the display artist so it appears in two places in my Main Panel - both in Elton John's section, and Pnau's section.

It uses my default sort settings: <Album Artist>/Year/<Sort Album>

Because the default "Sort as" Album Artist is Elton John; Pnau, the album sits in the correct place in Elton John's section (his albums sorted by year, it sits where 2012 should do) but in Pnau's because the "Sort as" starts with 'Elton' it sits above all Pnau's albums, so it comes before their debut album in 1999.

My requirement is that is is sorted by year in both Elton's section and Pnau's section. Is there currently a working solution for that, which I just haven't figured out yet?
Title: Re: Custom sorting
Post by: psychoadept on October 24, 2018, 04:30:55 AM
Unfortunately, the only way to make that happen would be to remove Album Artist from your sort and just sort by year. Which, if you're mostly looking at one artist at a time, might not be a big problem.