Feat/genres-v2-implementation (#3164)
authorJozef Kruszynski <60214390+jozefKruszynski@users.noreply.github.com>
Fri, 20 Feb 2026 17:04:41 +0000 (18:04 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Feb 2026 17:04:41 +0000 (18:04 +0100)
commit7c5bbe09fce4f6d8e8ff78f82030dbc766c9ffdf
tree5ae8c7305444b37a0b2bf31952721a55b6c9a976
parent38ecce4eb6dd799c715a45e3f16043016165ca9b
Feat/genres-v2-implementation (#3164)

* feat(genres): Core genre system

* feat(genres): add background scanner for metadata.genres

* refactor(genres): add genres to base

* test(genres): add test suite

* fix(genres): eixsting genres are not recreated at migration

* feat(genres): guard against infinite loops in scanner

* fix(genres): remove duplicate, improve tests

* fix(genres): limit genre tracks return

* refactor(genres): use logger rather than print

* refactor(genres): use asyncio.gather rather than sequential calls

* refactor(genres): various fixes after review comments

* refactor(genres): randomize selection, use asyncio gether

* refactor(genres): remove alias object

* fix(genres): fix n:n relationship, safeguard comparisons

* refactor(genres): address review comments

* fix(genres): fix issues after rebase

* test(genres): add missing param to library sync tests
17 files changed:
music_assistant/constants.py
music_assistant/controllers/media/albums.py
music_assistant/controllers/media/artists.py
music_assistant/controllers/media/audiobooks.py
music_assistant/controllers/media/base.py
music_assistant/controllers/media/genres.py
music_assistant/controllers/media/podcasts.py
music_assistant/controllers/media/tracks.py
music_assistant/controllers/music.py
music_assistant/controllers/player_queues.py
music_assistant/helpers/resources/genre_mapping.json [new file with mode: 0644]
music_assistant/models/music_provider.py
music_assistant/providers/test/__init__.py
pyproject.toml
tests/core/test_genre_helpers.py [new file with mode: 0644]
tests/core/test_genres.py [new file with mode: 0644]
tests/test_library_sync.py