Skip to content

Add explicit_only filter to smart playlist rules#1865

Open
dmoo500 wants to merge 5 commits into
music-assistant:mainfrom
dmoo500:feat/smart-playlist-explicit-filter
Open

Add explicit_only filter to smart playlist rules#1865
dmoo500 wants to merge 5 commits into
music-assistant:mainfrom
dmoo500:feat/smart-playlist-explicit-filter

Conversation

@dmoo500

@dmoo500 dmoo500 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

What does this implement/fix?

Adds UI for the explicit filter in smart playlist rules with clear, user-friendly options:

  • Allowed (default/no filter) — shows all tracks regardless of explicit flag
  • Explicit only — only show tracks marked as explicit
  • Not allowed (default when adding filter) — exclude explicit tracks

UI improvements:

  • Three-state dropdown with clear labels
  • Default selection is "Not allowed" when user adds the filter
  • Best-effort info message shown for both "From my library" and "Similar to..." modes
  • Uses tri-state field: null (allowed), true (explicit only), false (not allowed)

Related:

Screenshots

discover_explicit_filter library_explicit_filter

@OzGav

OzGav commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

This could be contentious as while I am a fan Marcel has pointed out in the past that this will only work for some streaming providers that send the metadata. Thus you can seelct the option but still get explicit songs which obviously wont be what the user expects.

@dmoo500

dmoo500 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

We could also show the "best effort" warning banner for rule-based filters — see screenshot. This makes it clear to users that filter results depend on provider metadata availability, not just in seed mode.

show_warning_on_rules Note: the view will look slightly different once PR #1866 (field icons) is merged.

@OzGav

OzGav commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

I haven't following this closely enough. Is that screenshot for in-library only?

@dmoo500

dmoo500 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

This is a suggestion for the "From my library" section, showing how the "Best Effort" warning banner could look with the filters (and the explicit_only filter).

This banner is already displayed in the "Discover" filters. The explicit_only filter could also be implemented there.

@OzGav

OzGav commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

OK that sounds OK. The point I was going to make is favourite and explicit are only available for in_library items. (Probably genre, album type and year as well but I would have to confirm)

@dmoo500

dmoo500 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

I've double-checked my current development:

"Discover" post filters (with existing "Best Effort" warning banner)

  • Genre
  • Album type
  • Year
  • Explicit (new)

"From my library" filters (without the "Best Effort" warning banner)

  • Genre
  • Album
  • Favorite
  • Artists
  • Album type
  • Year
  • Explicit (new)

If it turns out that the "Explicit" option in "Discover" isn't working, I can remove it when I make this pull request "ready for review".

@OzGav

OzGav commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

My point is you would still need the banner on in-library for explicit because many (most?) streaming providers don't send that flag and for local files there isn't a tag for it. The best you could probably do is a checkbox with something like "skip tracks with explicit lyrics when identified"

Moos, Daniel added 4 commits June 13, 2026 07:25
- Add 'Allowed', 'Explicit only', and 'Not allowed' options
- 'Allowed' (null) and undefined treated same on backend (no restriction)
- Default to 'Not allowed' when adding explicit filter
- Show best-effort info for both library and seed modes
- Rename explicit_only to explicit in API interface
@dmoo500 dmoo500 force-pushed the feat/smart-playlist-explicit-filter branch from fef98ff to 105cb60 Compare June 13, 2026 05:51
@dmoo500 dmoo500 marked this pull request as ready for review June 13, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants