Repository navigation
Let config actions mark themselves as destructive - #504
Conversation
|
@Bot-MArley review |
Bot-MArley
left a comment
There was a problem hiding this comment.
Note
This comment was written by Claude and posted by Bot-MArley on behalf of the Music Assistant maintainers.
Thanks @marcelveldt! This adds a destructive flag (default False) to ConfigEntry, plus a round-trip test, so clients can ask for confirmation before running actions like "Reset library database".
It looks good: the field is handled like advanced and requires_reload, nothing else in the models lists the fields one by one, and an older client simply ignores the new key. No changes requested.
One small thing, not blocking: the PR body ticks "Maintenance / chore", but a new client-facing field fits "New feature" or "Enhancement" better, since that box drives the label and the release notes.
It's still a draft, so it's waiting for you to mark it ready for review, and then for a maintainer to merge.
Update music-assistant-models to version [1.1.257](https://github.com/music-assistant/models/releases/tag/1.1.257) ## 🚀 Features and enhancements - Tell clients whether crossfade can be switched on for a queue (by @marcelveldt in [music-assistant#506](music-assistant/models#506)) ## 🧰 Maintenance and dependency bumps - Document the multiline format of a string config entry (by @marcelveldt in [music-assistant#505](music-assistant/models#505)) - Let config actions mark themselves as destructive (by @marcelveldt in [music-assistant#504](music-assistant/models#504)) ## 🙇 Contributors @marcelveldt Co-authored-by: musicassistant-bot[bot] <304008617+musicassistant-bot[bot]@users.noreply.github.com>
What does this implement/fix?
Some config actions wipe data the user cannot get back (for example "Reset library database"), yet a client cannot tell them apart from harmless ones, so they run on a single click. This adds a flag so clients can ask for confirmation first.
destructivefield onConfigEntry(defaultFalse)Related issue (if applicable):
reset_dbafter the next models releaseTypes of changes
bugfixnew-featureenhancementbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/serveris linked.