Fix add, cycle and multiply command.
This commit is contained in:
parent
a1eeaffe14
commit
9f4b31f166
1 changed files with 14 additions and 4 deletions
18
mpv.py
18
mpv.py
|
|
@ -643,14 +643,24 @@ class MPV(object):
|
|||
""" Mapped mpv frame_back_step command, see man mpv(1). """
|
||||
self.command('frame_back_step')
|
||||
|
||||
def _add_property(self, name, value=None):
|
||||
self.command('add_property', name, value)
|
||||
def _add_property(self, name, value=1):
|
||||
"""Add the given value to the property. On overflow or
|
||||
underflow, clamp the property to the maximum. If ``value`` is
|
||||
omitted, assume ``1``.
|
||||
"""
|
||||
self.command('add', name, value)
|
||||
|
||||
def _cycle_property(self, name, direction='up'):
|
||||
self.command('cycle_property', name, direction)
|
||||
"""Cycle the given property. ``up`` and ``down`` set the cycle
|
||||
direction. On overflow, set the property back to the minimum, on
|
||||
underflow set it to the maximum. If ``up`` or ``down`` is
|
||||
omitted, assume ``up``.
|
||||
"""
|
||||
self.command('cycle', name, direction)
|
||||
|
||||
def _multiply_property(self, name, factor):
|
||||
self.command('multiply_property', name, factor)
|
||||
"""Multiplies the value of a property with the numeric factor."""
|
||||
self.command('multiply', name, factor)
|
||||
|
||||
def screenshot(self, includes='subtitles', mode='single'):
|
||||
""" Mapped mpv screenshot command, see man mpv(1). """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue