Get correct track position on change events #1534
In particular, this allows to send the right information when: 1. the track finishes and switches to the next one in the list; 2. user presses next / previous The cases of EOS and stop event were already handled properly. Note: we only have GStreamer's `about-to-finish` event to deal with the end of a track, which usually happens a few seconds before the end of the track. We set the position to the length of the track, which is not overridden unless the user generates a relevant callback.
Flake failure is preexisting due to a newer version of flake8 catching more things that the old one :(
(It's been to long since I've looked at this in detail, so I'm missing a bit more state than I should)
I've tried to debug seek, but the problem appears in such a small time frame that I'm not sure whether it's bugging out because the logic of
If I keep seeking after the song I get all sort of unrelated traceback (plus buggy behaviour with
So I think this looks good as fix for the specific issue you are targeting. If we want this in a 2.0.x release we should probably cherrypick it into the right branch, or replace this PR with one against the release-2.0 branch instead of develop. Either way is fine by me.