Skip to content

Add support for sound effect media items#4669

Merged
marcelveldt merged 2 commits into
devfrom
marcelveldt-audio-overlays-foundation
Jul 8, 2026
Merged

Add support for sound effect media items#4669
marcelveldt merged 2 commits into
devfrom
marcelveldt-audio-overlays-foundation

Conversation

@marcelveldt

Copy link
Copy Markdown
Member

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.

  • Music providers can declare the new SOUND_EFFECTS feature and serve sound effect items live (no library sync, no favorites — discovery via the standard browse interface)
  • New music/sound_effects API command that lists all available sound effects from all providers (will feed the overlay picker in the frontend later)
  • Filesystem provider: new "Sound Effects" content type option, with tag parsing cached for fast repeat listings
  • Sound effects can also just be played directly like any other media item

Related issue (if applicable):

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • New music/player/metadata/plugin provider — new-provider
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — documentation
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Checklist

  • The code change is tested and works locally.
  • pre-commit run --all-files passes.
  • pytest passes, and tests have been added/updated under tests/ where applicable.
  • For changes to shared models, the companion PR in music-assistant/models is linked.
  • For changes affecting the UI, the companion PR in music-assistant/frontend is linked.
  • I have read and complied with the project's AI Policy for any AI-assisted contributions.
  • I have raised a PR against the documentation repository targeting the main or beta branch as appropriate.

Copilot AI review requested due to automatic review settings July 8, 2026 15:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_EFFECTS surfacing in provider browse and adds music/sound_effects to 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.

Comment thread music_assistant/providers/filesystem_local/__init__.py
Comment thread music_assistant/controllers/music/controller.py
@codspeed-hq

codspeed-hq Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 15.95%

⚡ 1 improved benchmark
✅ 17 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
test_list_artists_page 4.9 ms 4.2 ms +15.95%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing marcelveldt-audio-overlays-foundation (c9f8545) with dev (fe6d58f)1

Open in CodSpeed

Footnotes

  1. No successful run was found on dev (9be1527) during the generation of this report, so fe6d58f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Copilot AI review requested due to automatic review settings July 8, 2026 15:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

@marcelveldt marcelveldt merged commit 4c67ab9 into dev Jul 8, 2026
18 checks passed
@marcelveldt marcelveldt deleted the marcelveldt-audio-overlays-foundation branch July 8, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants