Fix for microseconds.

This commit is contained in:
Andrew Dunai 2018-09-12 16:52:16 +03:00
parent 3401b52eeb
commit e2c51d466f
No known key found for this signature in database
GPG key ID: 592B181FC403814E
2 changed files with 2 additions and 4 deletions

View file

@ -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):

View file

@ -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