mirror of
https://github.com/vale981/clay
synced 2025-03-06 01:51:38 -05:00
Fix for microseconds.
This commit is contained in:
parent
3401b52eeb
commit
e2c51d466f
2 changed files with 2 additions and 4 deletions
|
@ -236,9 +236,7 @@ class MPRIS2:
|
|||
|
||||
@property
|
||||
def Position(self):
|
||||
# TODO: Some weird microseconds/seconds stuff. `playerctl progress` shows weird values
|
||||
# for both VLC & MPV.
|
||||
return player.play_progress
|
||||
return player.time
|
||||
|
||||
# The following are custom additions to the protocol for features that clay supports
|
||||
def Mute(self):
|
||||
|
|
|
@ -180,7 +180,7 @@ class MPVPlayer(AbstractPlayer):
|
|||
Get their current movie length in microseconds
|
||||
"""
|
||||
try:
|
||||
return int(self.media_player.duration * 1e6)
|
||||
return int(self.media_player.playback_time * 1e6)
|
||||
except TypeError:
|
||||
return 0
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue