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

Built-in web API reports incorrect playback status #370

Closed
ungive opened this issue Mar 20, 2024 · 4 comments · Fixed by #373
Closed

Built-in web API reports incorrect playback status #370

ungive opened this issue Mar 20, 2024 · 4 comments · Fixed by #373
Assignees
Labels
Available in next release bug Something isn't working

Comments

@ungive
Copy link

ungive commented Mar 20, 2024

When I enable the built-in web API and navigate to localhost:47836/current, the status field rarely contains the right playing or paused value. E.g. after restarting the application it says "paused" even though I just continued my song, or when playing a different song and pausing it, it will say "playing" instead. This is likely related to #351. Everything else seems to work fine.

Built it from source (branch master).

@Mastermindzh Mastermindzh self-assigned this Mar 21, 2024
@Mastermindzh Mastermindzh added bug Something isn't working Available in next release labels Mar 21, 2024
@Mastermindzh
Copy link
Owner

Hey @jonasberge,

Could you confirm this only happens during startup?
I've been playing music for most of this morning and haven't noticed any wrong statuses reported.

I just had a thought whilst writing this though.... you're probably using the actual buttons in the UI right?
I just tried that and they don't update the status (and I know exactly why* too...).

Can you confirm it doesn't happen when you use the API's playpause but only happens if you use the built-in play/pause button?

The urls for play and pause are:

  • I did an update last version that significantly reduced the full-UI parsing frequency & media info updates by only updating when the title changes. So when you click the web button the event for a new status is never triggered. 😄
    Using the API ensures that the signal is sent.

This most likely also is the underlying cause in other issues.

@ungive
Copy link
Author

ungive commented Mar 21, 2024

I can confirm, it only happens with the UI buttons, when I use /playpause, /play and /pause everything works as expected.

@Mastermindzh
Copy link
Owner

@jonasberge,

Thanks for confirming, that'll give me the right direction to fix this.

@Mastermindzh
Copy link
Owner

@jonasberge,

Just refactored the code and tested it, works again 😄.
Gonna go have a bite to eat now and will continue working later today.

Will release a new version (5.10.0) later today!

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

Successfully merging a pull request may close this issue.

2 participants