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

feat(player): Real time positional player state #212

Merged
merged 3 commits into from
Oct 25, 2024
Merged

Conversation

FoxxMD
Copy link
Owner

@FoxxMD FoxxMD commented Oct 24, 2024

Checklist before requesting a review

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Describe your changes

  • Introduce positional and non-positional data structures
    • Refactor state player into types of each
    • Refactor listen ranges and progress into types of each
  • Implment (internal) real-time player and base positional player seeked/repeat on real-time drift instead of only reported position
  • Refactor tests to use (emulated) real-time components

While this is a large fundamental restructure it (should) only functionally affect Plex API Source as it makes it more accurate since we don't rely solely on reported position for calculated state and listening range.

On the dev side it makes player state logic much clearer as there are way few if-else blocks just checking for position === undefined.

* Introduce positional and non-positional data structures
  * Refactor state player into types of each
  * Refactor listen ranges and progress into types of each
* Implment (internal) real-time player and base positional player seeked/repeat on real-time drift instead of just reported position
* Refactor tests to use (emulated) real-time components
@FoxxMD FoxxMD added enhancement New feature or request safe to test trusted to build image labels Oct 24, 2024
@FoxxMD FoxxMD self-assigned this Oct 24, 2024
Copy link
Contributor

📦 A new release has been made for this pull request.

To play around with this PR, pull an image:

  • foxxmd/multi-scrobbler:pr-212

Images are available for x86_64 and ARM64.

Latest commit: c498bde

@FoxxMD FoxxMD merged commit f308f71 into master Oct 25, 2024
4 checks passed
@FoxxMD FoxxMD deleted the playerStateCleanup branch October 25, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request safe to test trusted to build image
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant