Draft
Conversation
Contributor
🔒 Dependency Security Report📦 Modified DependenciesThe following dependencies were added or modified: diff --git a/requirements_all.txt b/requirements_all.txt
index 247f2374..a5110069 100644
--- a/requirements_all.txt
+++ b/requirements_all.txt
@@ -42,7 +42,7 @@ librosa==0.11.0
lyricsgenius==3.7.5
mashumaro==3.18
music-assistant-frontend==2.17.86
-music-assistant-models==1.1.98
+music-assistant-models @ git+https://github.com/music-assistant/models.git@feat/genres-v2-implementation
mutagen==1.47.0
niconico.py-ma==2.1.0.post1
orjson==3.11.5New/modified packages to review:
🔍 Vulnerability Scan ResultsNo known vulnerabilities found
Automated Security Checks
Manual ReviewMaintainer approval required:
To approve: Comment |
marcelveldt
reviewed
Feb 17, 2026
| offset: int = 0, | ||
| order_by: str = "sort_name", | ||
| provider: str | list[str] | None = None, | ||
| genre_ids: int | list[int] | None = None, |
Member
There was a problem hiding this comment.
if we want to be consistent with the provider filter above, we may want to name this just genre ?
Contributor
Author
There was a problem hiding this comment.
Makes sense, I'll also update that this evening
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Genre V2: Complete Genre System with Aliases
Overview
This PR implements a complete overhaul of the genre system in Music Assistant, replacing the legacy
metadata.genresapproach with a flexible, user-managed genre system featuring genre aliases, full CRUD operations, and powerful filtering capabilities.Branch:
feat/genres-v2-implementationTarget:
devType: Feature
Features Implemented
1. Core Genre System
Genre Management
Alias System
Media Integration
genre_idsparametergenre_ids=[1,2,3])2. New API Endpoints
Genre Endpoints (
music/genres/)GET/countGET/library_itemsGET/getGET/overviewGET/radio_mode_base_tracksPOST/addPUT/updateDELETE/removePOST/add_alias_mappingDELETE/remove_alias_mappingPOST/restore_defaultsAlias Endpoints (
music/aliases/)GET/library_itemsGET/getPOST/addPUT/updateDELETE/removePOST/add_media_mappingDELETE/remove_media_mappingPOST/promote_to_genreMedia Filtering (Updated existing endpoints)
All media endpoints now support:
3. Alias Promotion
Purpose: Allows promoting an alias to become a standalone parent genre when it deserves its own top-level category.
What it does:
Example:
Protection:
4. Self-Alias Protection
What are self-aliases?
Self-aliases are automatically created when a genre is added. They match the genre's name exactly (e.g., "Rock" genre has a "Rock" alias). These are fundamental to the genre system.
Protection Mechanisms:
Cannot delete self-aliases (
music/aliases/remove)ValueErrorwith clear guidanceCannot unlink genre from its own self-alias (
music/genres/remove_alias_mapping)ValueErrorexplaining self-aliases cannot be unlinkedCannot promote self-aliases (
music/aliases/promote_to_genre)ValueErrorto prevent creating duplicate genresImplementation:
5. Genre Overview Endpoint
Purpose: Optimized single-call solution for building genre detail pages.
What it returns:
Benefits:
Example Usage:
6. Reverse Lookup for Aliases
Feature: GenreAlias objects now include a
genresfield showing parent genres.Use Cases:
Implementation:
Benefits:
7. Restore Default Genres (Dual Mode)
Feature: The
music/genres/restore_defaultsendpoint supports two restore modes for different use cases.Partial Restore (Default - Non-destructive):
genre_mapping.jsonFull Restore (Destructive):
Use Cases:
UI Integration: