summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael McSinyx <vn.mcsinyx@gmail.com>2017-09-13 15:17:30 +0700
committerRaphael McSinyx <vn.mcsinyx@gmail.com>2017-09-13 15:17:30 +0700
commit9f4b31f166089337896f675758bce8fb36308693 (patch)
tree626ac6f07e61cb9cf09c34dc9335f2a414a7bfe6
parenta1eeaffe14d31fa2daa019cbd7a67245c25912a8 (diff)
downloadpython-mpv-9f4b31f166089337896f675758bce8fb36308693.tar.gz
python-mpv-9f4b31f166089337896f675758bce8fb36308693.tar.bz2
python-mpv-9f4b31f166089337896f675758bce8fb36308693.zip
Fix add, cycle and multiply command.
-rw-r--r--mpv.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/mpv.py b/mpv.py
index 1c32e10..b035d00 100644
--- a/mpv.py
+++ b/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). """