Author Topic: Odd sorting behavior  (Read 699 times)

GizBee

  • Newbie
  • *
  • Posts: 15
I had to wipe Windows 10 and rebuild, then upgraded to Windows 11. I had meticulously manually re-sorted names (last name first) in MusicBee. When I downloaded MusicBee (v. 3.5.8150) to rebuild, I discovered numerous instances where my custom sorting was lost. What makes this odd is that many custom names were retained. It seems that this is confined mostly to one folder on an external hard drive dedicated to music - mostly, but not exclusively.

I was curious if anyone else experienced this, and if there was a fix that didn't involve me typing in a boatload of custom sorts.

karbock

  • Sr. Member
  • ****
  • Posts: 347
Hello Gizbee, and welcome to the forum.

Custom sort mappings are stored in MusicBee3settings.ini, in key <ArtistSortMapping>...</ArtistSortMapping>.
If the names you're looking for are absent from MusicBee3settings.ini/MusicBee3settings.bak, and if you have never populated tag ArtistSort in your music files, the only anchor of salvation is to rebuild a mapping list for those missing artist names.

But the good news is that you can partly automate the job. Moreover, it just so happens that a couple of months ago, I made a LibreOffice Calc sheet to avoid typing 2k custom sort mappings. I can send you the file with some explanation on how to use it, so that you can adapt it to your own needs. The file might work with MS Excel too, but I haven't tried.

Do you know how to extract a list of artist names from your music files? I did it with mp3tag. Don't hesitate to ask, if you don't find your way through its menus...

GizBee

  • Newbie
  • *
  • Posts: 15
Hello, Karbock! I've been using MusicBee for quite awhile, but only very recently needed to investigate an issue. I cannot find "MusicBee3settings.ini".

I'm not sure what you mean by populating the tag ArtistSort in my files.

I do have and use Mp3tag, but I've never used it to extract a list of artist names. I've researched extracting artists in Mp3tag, but didn't find anything that looked like what I needed.

If you'd be so kind as to instruct me how to extract, and then send me the Calc sheet, I would deeply appreciate it. With a little tweaking, I think Excel can read a LibreOpen doc.

Thank you very much!

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9363
If you're using the store version you won't be able to do as suggested with the ini file.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

GizBee

  • Newbie
  • *
  • Posts: 15
I downloaded MusicBee from this site. Installer Edition, not Store Edition.

karbock

  • Sr. Member
  • ****
  • Posts: 347
* If you don't use ArtistSort, never mind, let's keep it aside for now.
* MusicBeeSettings.ini/.bak are located in %APPDATA%\MusicBee (in the installed version). You may compare the values of <ArtistSortMapping>...</ArtistSortMapping> in both files: the lost values could still be present in the .bak version, one never knows.

* Anyway, I have prepared several files for you: an extraction formula, a Calc sheet, and some usage notes.

The files are stored in the following cloud folder:
https://drive.google.com/drive/folders/1NBQQb-YqC0VOgtP1ImLKlSqI7AGnfcg8?usp=share_link

Subfolder 'Mp3tag' contains:
* Artist List (csv).mte
* ReadMe.txt (= how to use it)

Subfolder 'LibreOffice' Calc contains:
* ArtistSortMapping.ods
* ReadMe.pdf (= how to use it)
* ArtistSortMapping.Screenshot1.AS IS.jpg (= what ArtistSortMapping.ods should look like when opened with LibreOffice)
* ArtistSortMapping.Screenshot2.EXAMPLES.jpg (= the first screen from my own sort mapping list)

Well, it took me some time to adapt the Calc sheet in particular: I merged the different formulas and defined a layout wich is, I hope, user-friendly enough, or not too user-unfriendly. :)
As I don't have MS Excel on my computer, I can't test if the formulas are converted correctly.

One more question: do you use MB's function Multiple Artist Splitter for your music files?
In that case, you should extract a list from tag Performer as well.
Last Edit: December 30, 2022, 09:32:21 PM by karbock

hiccup

  • Sr. Member
  • ****
  • Posts: 7907
As I don't have MS Excel on my computer, I can't test if the formulas are converted correctly.
Strictly out of curiosity I downloaded the files that you have concocted. (which seem to be great work)

Opening your Open Office spreadsheet in my Excel shows that your sheet has formulas containing regex?
That's probably going to be a problem since (regrettably) Excel has no build-in support for regex.

PS
If you would like to test your 'Calc' files in Excel, there should be a (free) Excel viewer available from MS.
Last Edit: December 30, 2022, 07:29:54 PM by hiccup

karbock

  • Sr. Member
  • ****
  • Posts: 347
@hiccup:

Thanks for your feedback!
Yes, the formulas are packed with RegEx. If they aren't supported in Excel, unfortunately I don't have an instant substitute to propose...

@GizBee:

As you have learned from hiccup's message, ArtistSortMapping.ods won't work with Excel in its present state.
If you consider installing LibreOffice (which is also free as in 'free beer'), be aware that it will occupy roughly 750 MB of disc space, since you can't restrict the installation to Calc, for instance.

GizBee

  • Newbie
  • *
  • Posts: 15
Thank you, Karbock, for all your assistance. I'm in the process of re-installing all of my software that was lost when I had to wipe out Windows. So I need to do that, then make sure everything is stable before adding new software. I don't mind installing LibreOffice at that point - I've got plenty of space, and can delete the program later. In the meantime, I've downloaded all your files, and the LibreOffice installer.

Thanks again, and Happy New Year to you!

GizBee

PS - I don't use the Multiple Artist Splitter.

karbock

  • Sr. Member
  • ****
  • Posts: 347
My pleasure!

Happy New Year to you, too! (And to all the readers.)

karbock

  • Sr. Member
  • ****
  • Posts: 347
I've upgraded ArtistSortMapping.ods.

Advantages:
- you can define your own NameContent codes and their matching RegularExpressions
- one occurrence of each RegularExpression
- short, generalised formulas

The current spreadsheet contains three tabs:
- Artists = main work tab, where you can:
          * fill in the artist names in input
          * specify the NameContent.MAN code if needed
          * retrieve the strings for the Artist Sort Mapping dialogue box
- Parsing (where you can add your custom NameContent codes if necessary)

Link:
https://drive.google.com/drive/folders/1NBQQb-YqC0VOgtP1ImLKlSqI7AGnfcg8?usp=share_link
Comments (see above):
https://getmusicbee.com/forum/index.php?topic=38353.0#msg208088

EDIT
latest version 14 Jan 2023
Last Edit: January 14, 2023, 02:28:16 PM by karbock