VLC volume should strictly be an integer
This commit is contained in:
parent
708ce210ba
commit
e0e3081eb1
1 changed files with 2 additions and 2 deletions
|
@ -210,14 +210,14 @@ class MediaVlcPlugin(MediaPlugin):
|
|||
""" Volume down by (default: 10)% """
|
||||
if not self._player:
|
||||
return None, 'No vlc instance is running'
|
||||
return self.set_volume(self._player.audio_get_volume()-step)
|
||||
return self.set_volume(int(max(0, self._player.audio_get_volume()-step)))
|
||||
|
||||
@action
|
||||
def volup(self, step=10.0):
|
||||
""" Volume up by (default: 10)% """
|
||||
if not self._player:
|
||||
return None, 'No vlc instance is running'
|
||||
return self.set_volume(self._player.audio_get_volume()+step)
|
||||
return self.set_volume(int(min(100, self._player.audio_get_volume()+step)))
|
||||
|
||||
@action
|
||||
def set_volume(self, volume):
|
||||
|
|
Loading…
Reference in a new issue