Skip to content

lastgenre: replace built-in genre list with improved hierarchy#6654

Open
spaceage64 wants to merge 1 commit into
beetbox:masterfrom
spaceage64:better-genre-list
Open

lastgenre: replace built-in genre list with improved hierarchy#6654
spaceage64 wants to merge 1 commit into
beetbox:masterfrom
spaceage64:better-genre-list

Conversation

@spaceage64
Copy link
Copy Markdown
Contributor

@spaceage64 spaceage64 commented May 18, 2026

Description

The current genre list is alright but not very extensive, and also contains some oddities.

Replaces genres-tree.yaml and genres.txt with a significantly expanded and restructured genre hierarchy.

  • 2,984 'main' (whitelisted) genres, up from ~740
    • Includes some much needed additions like 'Vaporwave', 'Hyperpop', 'Phonk', 'Cloud Rap', 'Midwest Emo', etc.
    • Also includes very extensive entries for 'world music' (which is not itself a genre). E.g., 'Singeli' (African), 'Son Cubano' (Latin American), 'Mandopop' (Asian), 'Klezmer' (Jewish), etc.
    • Properly lists actual genres from non-Western regions under their real genre instead of just a region. E.g., the current hierarchy lists genres like 'blues' and 'classical', but then also treats 'african' and 'asian' as genres. In my hierarchy, such music will be listed under their proper genre, not just a region. E.g., 'K-Pop' will be listed under Pop → Asian Pop → K-Pop, not asian → east asian → k-pop.
    • Excludes some vague/nonsensical entries, e.g., 'acoustic music' (not a genre--can be any genre), 'cassette culture' (also not a genre), 'dementia' (???), etc.
  • Many aliases supported (9,300+, up from 1546), will all refer to a standardised 'main' entry. E.g., 'hip-hop' will map to 'Hip Hop', 'dnb' will map to 'Drum & Bass'.
    • Also includes basic ascii aliases. E.g., both 'candomblé' and 'candomble' will map to 'Candomblé'.
  • Much work was put into organising the tree correctly, meaning that a proper hierarchy of a genre can be traced. Some examples:
    1. Electronic → Electronic Dance Music → House → Hard House → UK Hard House → Scouse House → Pumping House → Hardbass
    2. Classical → Asian Classical → East Asian Classical → Korean Classical → Korean Court → Jeong-ak → Gagok
    3. Folk → Traditional Folk → European Folk → Balkan Folk → Greek Folk → Cretan Folk → Rizitika
  • Proper Case genre names. Also supports proper case if other letters than the first one need capitalisation, e.g., 'IDM', 'HexD', etc. Or will lowercase if needed, e.g., 'Lo-fi' instead of 'Lo-Fi'.
    • Will need some work changing the current capitalisation logic to actually produce this as output, but at least we have a good source for proper capitalisation to work with now.

Sources used:

Fixes #6628

To Do

  • Documentation. The proposed hierarchy comes properly capitalised by default. I think ideally, when capitalisation is activated, it will use use the untouched terminology, and otherwise just lowercase everything. Currently the setup is different, just applying Proper Case to any lowercase default value. If that logic is altered, we will need new documentation, but as it is no new documentation is required.
  • Changelog. Will add this once it's approved.
  • Tests. I use this hierarchy myself.

I don't know if my PR is even appreciated, but a lack of extensive genre maintenance was bothering me personally. The default list seems to be based on some very old extraction of Wikipedia and isn't necessarily of high quality. So I put a lot of effort into building this for personal use and I thought I'd at least offer to share. Please let me know if anything more would be required from my side.

@spaceage64 spaceage64 requested a review from JOJ0 as a code owner May 18, 2026 19:18
@github-actions github-actions Bot added the lastgenre lastgenre plugin label May 18, 2026
@spaceage64 spaceage64 force-pushed the better-genre-list branch from 52931f4 to dcc1a46 Compare May 18, 2026 20:58
@snejus
Copy link
Copy Markdown
Member

snejus commented May 21, 2026

@spaceage64 the tests are failing. @JOJ0 I'll leave this one to you!

@spaceage64 spaceage64 force-pushed the better-genre-list branch from dcc1a46 to b27c421 Compare May 22, 2026 09:13
@spaceage64
Copy link
Copy Markdown
Contributor Author

Thanks. Yes, I think the Proper Case is causing the tests to fail. In practice, it shouldn't cause issues though. I have made the list Proper Case so we no longer have to use very simplistic code to have beets do the Proper Case conversion. Please let me know if more input is required from my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lastgenre lastgenre plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

genres-tree.yaml: categorizes Colombian latin pop as europop

2 participants