summaryrefslogtreecommitdiff
path: root/mpv.py
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2017-09-14 12:07:11 +0200
committerjaseg <code@jaseg.net>2017-09-14 12:07:11 +0200
commit901e42042b3cc0622db1ac224d6f0c9ee794517c (patch)
treedb5afafda0dc8eae223708850f3a02f0126addff /mpv.py
parentdcf75e604c1277eeac4aa542f359395f560edbb9 (diff)
downloadpython-mpv-901e42042b3cc0622db1ac224d6f0c9ee794517c.tar.gz
python-mpv-901e42042b3cc0622db1ac224d6f0c9ee794517c.tar.bz2
python-mpv-901e42042b3cc0622db1ac224d6f0c9ee794517c.zip
Nicer API names for add/multiply/cycle property
add: _add_property -> property_add multiply: _multiply_property -> property_multiply cycle: _cycle_property -> cycle
Diffstat (limited to 'mpv.py')
-rw-r--r--mpv.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/mpv.py b/mpv.py
index 8187fc2..3fd14ae 100644
--- a/mpv.py
+++ b/mpv.py
@@ -630,22 +630,22 @@ class MPV(object):
"""Mapped mpv frame_back_step command, see man mpv(1)."""
self.command('frame_back_step')
- 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
+ def property_add(self, name, value=1):
+ """Add the given value to the property's value. 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'):
+ def property_multiply(self, name, factor):
+ """Multiply the value of a property with a numeric factor."""
+ self.command('multiply', name, factor)
+
+ def cycle(self, name, direction='up'):
"""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):
- """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)."""
self.command('screenshot', includes, mode)