Author Topic: Custom sorting  (Read 12714 times)

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 31853
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
Last Edit: April 14, 2017, 09:10:18 PM by Steven

tanstaafl

  • Jr. Member
  • **
  • Posts: 27
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?)

psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10296
I love this concept!  I would find it most useful with Sort Composer, I think.
MusicBee Wiki
Use & improve MusicBee's documentation!

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

Bee-liever

  • Member
  • Hero Member
  • *****
  • Posts: 3633
  • MB Version: 3.4.7701 P
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
MusicBee and my library - Making bee-utiful music together

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 31853
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

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 31853
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?

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 31853
This is done now as described above. I will make it available in the next day after some more testing

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 31853
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
Last Edit: April 20, 2017, 09:55:42 PM by Steven

tanstaafl

  • Jr. Member
  • **
  • Posts: 27
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.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 31853
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

tanstaafl

  • Jr. Member
  • **
  • Posts: 27
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.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 31853
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"


Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 31853
i am going to need your settings file - help/ support/ view settings

tanstaafl

  • Jr. Member
  • **
  • Posts: 27
PM sent. Let me know if you have any problems opening it.