dakboard / Cloud-Platform

Feature requests, enhancements and anything you'd like to see in DAKboard!
https://dakboard.com
168 stars 39 forks source link

Sonos - Paused songs still display under specific conditions #2205

Closed cocarrig closed 1 day ago

cocarrig commented 2 months ago

Describe the bug Sonos integration will continue to display paused songs when more than one speaker group has been playing in a Sonos block.

Refreshing the screen URL appears to remove the paused group.

To Reproduce Steps to reproduce the behavior:

  1. Authorize sonos account in DAKboard and create a sonos block
  2. Check option 'Hide this audio block when paused for more than 10 minutes'
  3. Begin playing two separate songs on two separate speaker groups in sonos
  4. Note that both songs will display in the block
  5. Pause one song for one speaker group
  6. Note that the paused song will display in the screen block indefinitely alongside the one that is still playing, and not indicate that it is paused

Expected behavior The paused song should indicate that it is paused (display play button), and hide after 10 minutes of being paused.

Screenshots Top entry in the below example should be paused image

Dan-Peck commented 2 months ago

Dev Notes

After looking through this with the team, we found that under these conditions, Sonos does not send information about the group that is no longer playing. However, since the Screen already has data allotted for that group, when it goes to "update" the block, it only updates the groups that Sonos sent to us, leaving any others untouched.

To address this, we will need to have the "update" code remove any groups that Sonos did not return back in its response.

Dan-Peck commented 1 day ago

Merged in @ 6ce4f2c and added to the queue for upcoming release to the live site.