Repository navigation
fix(music): show the endless radio switch as on while a started station plays - #1185
Merged
Merged
Conversation
…on plays A station started with Start radio keeps extending with endless radio off, but the queue sheet's switch showed only the saved setting: it read off while the station ran, and turning it off did not stop the station. - Move the explicit-station flag out of Media3MusicService into EnhancedMusicPlayerManager.radioStationActive (session only, reset with the queue) so the UI can observe it. - MusicRadioSwitch: the switch shows the setting or a running station, and turning it off ends the station too. - EnhancedMusicPlayerManager.playTrack ends a named station: the service reads a new queue that shares a track with the station as the same session, so the station used to carry on into the user's next queue. Start radio re-marks it from its pending seed. Matches Flow-Desktop Flow-Tube#93. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XATQLbtRgFGN5N2bEVWx82
8 of 12 tasks
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
A station started with Start radio keeps playing even when endless radio is off, but the queue sheet's switch only showed the saved setting: it read off while the station ran, and turning it off didn't stop the station.
EnhancedMusicPlayerManager.kt: the explicit-station flag moves out ofMedia3MusicServiceinto a session-onlyradioStationActiveflow (reset with the queue), so the UI can see it. The service sets it on an explicit reseed and reads it when extending.MusicRadioSwitch.kt(new, split out ofMusicPlayerViewModellikeMusicPlayerLyrics): the switch shows on for the saved setting or a running station, so one tap stops whichever is running; turning it off ends the station too.EnhancedMusicPlayerManager.playTrackends a named station. The service reads a new queue that shares a track with the station as the same session (MusicRadioPlanner.resolveQueueContext), so the station used to carry on, unseen, into the next queue the user played. Start radio still re-marks it from its pending seed.MusicRadioSwitchTest(4) andMusicRadioStationTest(1).Follows the desktop behaviour agreed in Flow-Tube/Flow-Desktop#93.
Related issue
None filed. Follow-up to Flow-Tube/Flow-Desktop#93, as mentioned there.
Change type
Validation
./gradlew :app:assembleGithubDebug./gradlew :app:testGithubDebugUnitTest(3141 tests, 0 failures)compileFossDebugKotlin,spotlessCheck,ktlintCheck)Test device and Android version:
Pixel 10 Pro · Android 17 (SDK 37)
Endless radio off: Start radio shows the switch on and keeps refilling; one tap turns it off and nothing more is added. Starting a station, then playing a song that was already in it, ends the station. With the setting on, turning the switch off clears both.
Screenshots or recordings
start-radio-switch-android.mp4
Risk and compatibility
Session-only state; the saved setting and its migration are untouched. The only playback change is that starting a new queue ends a named station, matching desktop.
AI disclosure: This PR was largely written by Claude (Opus 5.5) but was fully reviewed and tested by myself before raising this.