Add support for sound effect media items#4669
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class SoundEffect support as a new live-fetched, playable media type (not library-backed), enabling providers (notably filesystem) to expose sound clips cleanly and paving the way for upcoming audio overlay UX.
Changes:
- Introduces
ProviderFeature.SOUND_EFFECTSsurfacing in provider browse and addsmusic/sound_effectsto aggregate available sound effects across providers. - Extends the filesystem local provider with a new “Sound Effects” content type, including tag parsing + caching and SOUND_EFFECT stream details support.
- Updates translations/strings and queue default enqueue config scaffolding for the new media type.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/providers/filesystem/test_sound_effects.py | Adds filesystem provider tests for sound effect enumeration, caching, and browse mapping. |
| music_assistant/translations/en.json | Adds English strings for sound effects content type and folder naming. |
| music_assistant/strings.json | Adds source strings for content type option and media folder name for sound effects. |
| music_assistant/providers/filesystem_local/strings.json | Adds filesystem provider config option string reference for sound effects content type. |
| music_assistant/providers/filesystem_local/constants.py | Adds sound effects content type option + cache category/constants for sound effects scanning. |
| music_assistant/providers/filesystem_local/init.py | Implements sound effect feature declaration, browse mapping, live retrieval, caching, and streaming details. |
| music_assistant/models/music_provider.py | Adds abstract SoundEffect retrieval APIs and browse folder support for providers declaring SOUND_EFFECTS. |
| music_assistant/controllers/player_queues/constants.py | Adds default enqueue option key constant for sound effects. |
| music_assistant/controllers/player_queues/config.py | Registers the (hidden) default enqueue option entry for sound effects. |
| music_assistant/controllers/music/controller.py | Adds music/sound_effects, live resolution for MediaType.SOUND_EFFECT, and rejects sound effects for favorites/library. |
Contributor
Merging this PR will improve performance by 15.95%
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes |
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.
What does this implement/fix?
Adds support for sound effects as a new kind of playable content, live-fetched from providers (like podcast episodes and audio sources) — so sound clips no longer end up between your music. This is the foundation for the upcoming audio overlay feature (mixing e.g. rain sounds into queue playback), as discussed in #3844.
SOUND_EFFECTSfeature and serve sound effect items live (no library sync, no favorites — discovery via the standard browse interface)music/sound_effectsAPI command that lists all available sound effects from all providers (will feed the overlay picker in the frontend later)Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.