Repository navigation
Tell clients whether crossfade can be switched on for a queue - #8455
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 publishes a new crossfade_available field on the queue, worked out with the same check that refuses switching crossfade on, and refreshes it on player updates and saved player configs. It isn't written to the queue cache, and the README and tests cover it. The logic looks right to me. One thing is missing before this can merge:
Requested changes
- [PROBLEM]
crossfade_availableis a new model field that now goes out to every client with each queue update, butAPI_SCHEMA_VERSIONis still 129. The comment above it asks for a bump for exactly this case, so clients that ship separately (the HA integration, the companion apps) can tell which servers fill the field. Please bump it to 130 (inline at controller.py#L4264).
|
@Bot-MArley review again |
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 publishes crossfade_available on the queue, worked out with the same check that refuses switching crossfade on, and keeps it current on player updates and saved player configs. It isn't stored with the cached queue, and the models pin on dev (1.1.257) already includes the field.
The API_SCHEMA_VERSION bump to 130 that I asked for last time is in now, so that point is fixed (the old conversation still needs resolving by hand). It merges cleanly onto the latest dev, and nothing else stood out: it looks good to me. It changes core code in the player queues controller, so I don't approve it on my own; comment @Bot-MArley approve and I will.
|
Lab gate |
|
@Bot-MArley approve |
|
Note This comment was posted by Bot-MArley on behalf of the Music Assistant maintainers. @marcelveldt Noted for cb1ecaf: I'll approve it in a few minutes if my review of this commit is clean, and review it first if I haven't. Dependency changes and new providers still need a maintainer's approval. To have it merged, say |
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, looks good to me 🙌 Approved at your request: the review found no open points, the schema bump is in, CI is green, and the lab gate passed.
…d Sonos bit depth (#1352) <!-- Thanks for contributing. The checklist below is short but the build enforces most of it, so ticking it off saves a round trip. Full guide: https://github.com/music-assistant/music-assistant.io/blob/beta/CONTRIBUTING.md --> ## What does this change? A continuous stream now plays in the sample rate of its first track, so the "Flow mode sample rate" setting and the Sendspin "Sample rate selection" are gone from the pages (music-assistant/server#8453). The crossfade button in the Now Playing view is greyed out with the reason when the player's playback method cannot crossfade (music-assistant/server#8455, music-assistant/frontend#3404). An MPD player can play track by track (music-assistant/server#8462), and the Sonos page says in which bit depth each lossless level plays (music-assistant/server#8466). The new default playback quality of music-assistant/server#8459 needs no change, as no page named the old one. Builds on #1349. - Individual player settings: removed the "Flow mode sample rate" section, the "Continuous stream" row matches the option text, and the playback method section says which sample rate a stream plays in - Sendspin and Samsung WAM: describe the sample rate a stream plays in instead of the removed setting - Now Playing view and playback method: the crossfade button is greyed out with the reason - MPD: **Track by track, started by Music Assistant** next to **Continuous stream** - Sonos: which playback quality to pick for hi-res music ## Checklist - [x] Correct branch: `main` if this fixes something already on the live site, `beta` if it adds anything new - [ ] Any new page has a sidebar entry in `astro.config.mjs`, except music sources and player providers ### Only if you are adding a music source or a player provider <!-- Plugins, metadata providers and audio analysis providers do not need these. --> - [ ] File named after the source or provider, since the menu is sorted by filename - [ ] Icon added to `public/assets/icons/`, and it is visible against a white background - [ ] Entry added to `src/data/music-sources.ts` or `src/data/players.ts`, with categories --- Once this is open, scroll down to the checks and wait for **Deploy Preview**. If it is green, click the link to see your change on the site. If it is red, click `Details`, read the error at the bottom of the log and push a fix to the same branch. There is no need to open a new pull request.
What does this implement/fix?
The server now tells clients whether crossfade can be switched on for a queue, so they can show the crossfade button as unavailable instead of showing an error after it is pressed. The button itself follows in the frontend.
crossfade_available, set by the same rule that refuses switching crossfade on (one shared check)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. (Tell clients whether crossfade can be switched on for a queue models#506)music-assistant/frontendis linked.