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

Time/Position is wrong after "pause" #213

Closed
funtax opened this issue Apr 20, 2020 · 7 comments
Closed

Time/Position is wrong after "pause" #213

funtax opened this issue Apr 20, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@funtax
Copy link
Contributor

funtax commented Apr 20, 2020

If you are listening to a song (playing), press pause, then wait several seconds and press play again.
The position shown inside Spotify is now wrong.
It seems like it continues the position-timer in the background.

Maybe this issue has been introduced by #175 ?

I have a private Java-implementation of librespot and in my project I am sending the current position reported by the Vorbis-decoder once the playback-state changes, and additionally frequently during playback to force the Spotify-client and the local client to be in-sync.

In librespot-java, it's done eg. here and I think it's not working well:

Player.playbackResumedFromHalt():
state.setPosition(state.getPosition() - diff);

Maybe it's possible to either fix this, or use "player.getPosition" if possible and only use above code if player.getPosition() returns null in case of episodes.

And eventually it's possible to send position-updates frequently each x seconds for a better synchronization with the client?

@funtax funtax added the bug Something isn't working label Apr 20, 2020
@devgianlu
Copy link
Member

I am in the process of rewriting the player to accommodate the metrics required for #155, I'll keep this issue open. The issue will probably reappear.

@josephcarroll
Copy link
Collaborator

Just as an FYI - I can replicate the issue consistently.

@funtax
Copy link
Contributor Author

funtax commented Apr 27, 2020

This issue is still open with the latest version (#155 merged into dev).

@devgianlu
Copy link
Member

I know, I wanted to merge it because the player code changed quite a lot. Will take a look at this next.

@funtax
Copy link
Contributor Author

funtax commented Apr 27, 2020

Yes of course, no worries. The latest version runs right now pretty well on my device (right now) :)

@devgianlu
Copy link
Member

This should now be fixed, perhaps not in the way Spotify intended, but it works.

@funtax
Copy link
Contributor Author

funtax commented Apr 29, 2020

Works, thank you very much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants