Author Topic: Issues with tag hierarchy explorer  (Read 1173 times)

iristwirl

  • Newbie
  • *
  • Posts: 14
I've recently reinstalled MB after about 2 years away from it, with the intention of reorganizing my library (as some other users of MB do) around a genre -> subgenre hierarchy (ideally in a way that I can take deeper than 2 levels, and tag with multiple branches of as well).

However, even after searching through the forums, I haven't really been able to make sense of any of the methods people used or been able to successfully set up anything through custom tags.

I've also tried making use of the Tag Hierarchy Explorer (alongside hiccup's Enhanced Genre Hierarchy List), but both during my initial attempts to use the panel prior to installation of the Enhanced list as well as after it the panel has displayed an "Error loading hierarchy file: Template is missing or corrupted 'Genres.txt'.

MB itself is installed on my C: drive while my library is on my D: drive, if that has any impact on this.

Does anyone have any insight on how I can get things to work here? Thanks.

karbock

  • Sr. Member
  • ****
  • Posts: 320
Here is some (structured) information about the tag hierarchy list (THL), based on my experience.
With this help, you can
* check if the file is in the correct location,
* check if it has the desired format/content,
* and adapt it to your own tagging scheme if needed.

Location of THLs (Genres.txt, ...)

In the installed version:
    %USERPROFILE%\AppData\Roaming\MusicBee\TagHierarchyTemplates
In the portable version:
    <MusicBee software folder>\AppData\TagHierarchyTemplates

You can have several THLs (with filenames of your choice) in the folder. In that case, they appear in the interface menu of the "Tag Hierarchy explorer" -> just select the one you wish to apply. For example, you can keep the original Genres.txt and Enhanced genre hierarchy.txt, while developing MyOwnGenreList.txt.

Structure and content of a THL

The THL must be a plain text file, where each line is:
* either a category name (or subcategory, or sub-sub-category, etc.)
* or a tag value that will be linked to the last mentioned (sub(sub))category

Line formats:
* a main category name starts a line (no indentation)
* a subcategory is indented with exactly 4 spaces, a sub-sub-category with 8 spaces, etc.
* a (sub(sub))category name mustn't comprise '::'
* a tag value following a (sub(sub))category is indented with 4 more spaces,
and must be formatted this way:
<value>::<tagname>

For example, see below an excerpt from my own THL.
It is based on the genre tag, where keywords are semicolon-separated in my music files.

Code
SUNG WORKS
    (ALL)
        Sung::genre
    A cappella::genre
    Cantata & oratorio
        Cantata::genre
        Oratorio::genre
    Song::genre
    Choir singing::genre
    Musical::genre
    Opera::genre

FYI, I have retagged genre in my whole collection. It can have values such as:
* Sung; Song; Pop
* Sung; Song; World; Corsica
* Instrumental; Synthesizer
* Instrumental; Classical; Baroque; Orchestra; Concerto; Violin
* Sung; Classical; Baroque; Cantata; Religious
* Spoken; Documentary
etc.

Let's suppose you also have populated the language tag in your collection, another portion could look like this:
Code
LANGUAGES
    Indo-European languages
        Germanic languages
            English::language
            Dutch::language
            German::language
            Swedish::language
            Norwegian::language
            Danish::language
            Icelandic::language
        Romance languages
            Latin::language
            French::language
            Italian::language
            Spanish::language
            Portuguese::language
            Romanian::language

For your information:
* Genres.txt is based on genre only;
* Enhanced genre hierarchy.txt relies on genre and subgenre;
* my own list uses genre, language, and custom1 (MediaType, or TMED), and implies retagging of the whole music collection.
Last Edit: June 30, 2022, 03:30:53 PM by karbock

hiccup

  • Sr. Member
  • ****
  • Posts: 7781
An excellent explanation by karbock.
It will probably be more than sufficient to help you to get things working.

I am wondering about the corruption though.
Any chance you are using the Store version, and/or perhaps have antivirus software interfering/blocking things?
(if that is the case, see if you can move to using the portable version, and whitelist MusicBee in your AV application)
Last Edit: June 30, 2022, 03:58:24 PM by hiccup

iristwirl

  • Newbie
  • *
  • Posts: 14
I've switched to the portable version, which solved the corruption.

After re-reading threads on here I was able to get your THL going, and after a little experimentation I think I've gotten a good enough sense of how to build relationships between tags that I can create a THL based on the genre/subgenre/etc hierarchy I'm in the process of building as I import reorganized pieces of my library.

The point I'm still stuck at is that as far as I can tell I've structured my THL properly, but when I switch from another THL to mine the explorer panel goes from working to simply displaying "All" with no further nodes.


Explorer panel with Genres.txt selected


Explorer panel with the THL I'm piecing together selected


Current state of my THL (having made sure to use 4 spaces and not Tab when editing in Notepad)

hiccup

  • Sr. Member
  • ****
  • Posts: 7781
…goes from working to simply displaying "All" with no further nodes…
Check karbock's examples in the CODE fields.
(and also what he wrote)
Last Edit: July 01, 2022, 01:14:09 PM by hiccup

iristwirl

  • Newbie
  • *
  • Posts: 14
…goes from working to simply displaying "All" with no further nodes…
Check karbock's examples in the CODE fields.
(and also what he wrote)

Fixed the single/double colons and now it's all gravy, cheers.

iristwirl

  • Newbie
  • *
  • Posts: 14
Ok, turns out everything's not gravy quite yet...

From my past experiences with using multiple values in Genre just fine and other THLs being set up with 3+ layers just using Genre and Subgenre tags, I figured once I made Subgenre through custom tags I'd just be able to throw the values for multiple layers in there, but nothing on the wiki or forums as given me any clues on whether/how I can get past it refusing to take more than one value.

hiccup

  • Sr. Member
  • ****
  • Posts: 7781
I don't think I understand.
Could you explain differently, perhaps with some concrete example(s)?

iristwirl

  • Newbie
  • *
  • Posts: 14
Based on both my prior knowledge that the Genre tag can hold multiple values, and looking at other people's THLs and seeing that they'd been able to assign values to both Genre and Subgenre at multiple levels, my approach to my THL involved assigning top-level genres to Genre and every other level to Subgenre (as made through custom tagging, of course)

For example
Rock (genre) -> Surf rock (subgenre)
Metal (genre) -> Black metal (subgenre) -> Blackgaze (subgenre)
Club & Dance (genre) -> House (subgenre) -> South African house (Subgenre) -> Kwaito (Subgenre)

I can build these relationships in my THL and have the explorer panel accept it without issue, but when I try to enter multiple values (eg 'Black metal' and 'Blackgaze') in my subgenre tag when editing an album/track, the field will only accept the first tag I enter.


Nevermind, I opened MB in case I needed to screenshot/verify anything and my Subgenre tag is now accepting multiple values without any problems.

hiccup

  • Sr. Member
  • ****
  • Posts: 7781
The tag hierarchy explorer has a 'search' option in the header.

I was expecting/hoping that when using it on e.g. a genre table, you could search for the name of a genre.
But it looks like it doesn't work like that.

It seems to work by only matching the first typed letter(s), and only for entries that are in view at that moment.
So if you have the table collapsed—it only displaying the main nodes—you won't be able to find any underlying genres.
It seems it's also not possible to search for a specific string within a genre name.

Is this indeed the case, or can I change something so that it will be possible to find entries in the whole hierarchy table?