Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: DSP edge cases around groups #1879

Merged
merged 4 commits into from
Jan 16, 2025

Conversation

maximmaxim345
Copy link
Contributor

This PR fixes various edge cases I missed with #1839.

Reload Detection

The existing logic for issuing DSP reloads when grouping or ungrouping was flawed.
This reworks this section, handling all edge cases I can think of including:

  • Don't restart playback if the leader already had DSP disabled
  • Don't restart playback if a group shrank to a single device that has DSP disabled
  • Proper handling of PlayerGroups
  • PlayerGroup with only a single member

Additionally, the existing logic had another oversight where it would issue a reload command for every device in the group. This fixes that by only reloading the leader/PlayerGroup.

PlayerGroups with single members

Another previously missed edge case involves groups with single members that would mistakenly use the DSP Config of the PlayerGroup instead of the Player. This is now fixed.

This now allows all PlayerGroups with single devices to correctly apply DSP.

@marcelveldt
Copy link
Member

The linter found something - maybe add an exclusion to that function for now, it complains about too many statements.
Something for later times is trying to split all that up into smaller parts but not a prio for now.

@marcelveldt marcelveldt merged commit 3b4304f into music-assistant:dev Jan 16, 2025
4 checks passed
@maximmaxim345 maximmaxim345 deleted the fix/dsp-edge-cases branch January 17, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants