Skip to content

Commit 32dda70

Browse files
Round volume read from playbin to 1 decimal (#139)
1 parent 3b4fdfa commit 32dda70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/player_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,9 @@ def query_volume(self):
509509
"""
510510
volume = self.playbin.get_property("volume")
511511
if self.quadratic_volume:
512-
return volume ** (1 / 2)
512+
return round(volume ** (1 / 2), 1)
513513
else:
514-
return volume
514+
return round(volume, 1)
515515

516516
def change_volume(self, value):
517517
"""Set the playback volume.

0 commit comments

Comments
 (0)