Restore PlayerQueue.is_dynamic after loading queue from cache#3948
Merged
MarvinSchenkel merged 1 commit intoMay 22, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates player queue restoration to recompute queue.is_dynamic after loading cached queue state, ensuring older cache entries (without the field) behave correctly.
Changes:
- Recompute
queue.is_dynamicafterqueue.from_cache(prev_state)using_is_radio_source_dynamic(queue.radio_source).
c187f96 to
63d52ab
Compare
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.
Summary
Fixes a bug where
PlayerQueue.is_dynamicwas not correctly restored when a queue was loaded from cache on server startup.Problem
PlayerQueue.from_cache()(inmusic-assistant-models) reconstructsradio_sourceinternally, but does not recalculateis_dynamic. After a server restart, any queue that had a dynamic playlist in itsradio_sourcewould haveis_dynamic = Falseuntil the user replayed the playlist.PR #3886 set
is_dynamicat all directqueue.radio_source =assignments, but missed this indirect path viafrom_cache().Fix
After calling
queue.from_cache(prev_state), recalculateis_dynamicfrom the restoredradio_source.Related