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

Bug - End of Chapter Sleep Timer doesn't work w/ Modified Playback Speed #101

Open
some-guy-23 opened this issue Nov 2, 2022 · 1 comment

Comments

@some-guy-23
Copy link
Contributor

It appears when choosing "end of chapter" in the sleep timer, it doesn't take into account the current playback speed. So if you are listening at 1.2x, and the chapter is 30 minutes long, it will play for exactly 30 minutes, going past the end of the chapter.

@some-guy-23
Copy link
Contributor Author

Looking into this more, and it is actually adding additional time to the "end of chapter" sleep timer when Playback speed is higher than 1x. This is an order-of-operations issues with the math involved calculating remaining time, since it is doing the division first - https://github.com/mattttvaughn/chronicle/blob/develop/app/src/main/java/io/github/mattpvaughn/chronicle/features/currentlyplaying/CurrentlyPlayingViewModel.kt#L602

I've created a PR w/ the simple fix here - #102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant