pyatv: push updates is broken when seeking media
Describe the bug
I have discovered that push updates gives incorrect information when seeking media on another source. I have reproduced this on Disney Plus & Netflix. I discovered this initially through the home assistant integration, and then I reproduced it using pyatv on the command line.
Error log
There is no error, it is a silent corruption.
How to reproduce the bug?
Use atvscript --id ... --airplay-credentials ... push_updates
in one terminal. Use atvremote --id ... --airplay-credentials ... playing
in another terminal.
Start to play a show on Disney Plus. You can see that atvscript
shows that playback has begun, and it shows the correct position. You can also run atvremote
and see that it shows the correct position.
Next, using the apple TV remote or home assistant integration, seek to a new position. Pause & unpause the show. You can see that atvremote
shows the correct & updated position. However, although atvscript
will have got push updates for the playing/paused state, it will have the old position plus the duration of playback since seeking.
What is expected behavior?
The pushed updates should register the new position after seeking.
Operating System
macOS & homeassistant haos
Python
3.6
pyatv
0.10.3
Device
Apple TV 4k OS 16.3.1
Additional context
I will investigate more to see if I can identify a line of code to change.
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 26 (5 by maintainers)
I would love to see this propagate through here to home assistant; it’d be really valuable there! On Feb 1, 2024 at 1:10 PM -0500, Michael Schwartz @.***>, wrote: