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

MPRIS: Fix seek actions to correctly move the specified amount of time #782

Closed
wants to merge 1 commit into from

Conversation

grahamvh
Copy link

@grahamvh grahamvh commented Aug 6, 2023

Hello!
This fixes the issue where MPRIS seek calls would cause cozy to skip ahead to the next chapter #781
Found that there was another function that basically already did what was needed for seeking in MPRIS, and thus co-opted and modified it to work for both purposes.

Perhaps it would be better to chase why self._player.position returns seemingly random numbers. However, it seemed more prudent to just reuse existing code for this purpose.

Let me know your thoughts, happy to throw this away and go a different direction.
(Disclaimer: I'm a newbie to contributing to open source)

@rdbende
Copy link
Collaborator

rdbende commented Dec 9, 2023

So the problem was, that while Player.position expects seconds in the setter, it returns nanoseconds from it's getter. I fixed this and a couple of other issues in #820

@geigi
Copy link
Owner

geigi commented Dec 11, 2023

Firstly, thanks for your PR :) And thanks @rdbende for finding the cause of this bug. As PR #820 is also fixing this bug I'm going to close this one as it creates additional complexity e.g. in the seek function. We should definitely look into streamlining the getter and setters of the Player.position. But thanks again for looking into it @grahamvh

@geigi geigi closed this Dec 11, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants