summaryrefslogtreecommitdiff
path: root/mpv.py
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2016-08-07 19:14:26 +0200
committerjaseg <code@jaseg.net>2016-08-07 19:14:26 +0200
commitdc1c4d89a5dd918c9d9f586e93a316845d47e3bf (patch)
treecd81249f280a4c39a13fda92b4e8a38c5aadf225 /mpv.py
parent14bb2c3223233079597d20c63df2cebdd5c90708 (diff)
downloadpython-mpv-dc1c4d89a5dd918c9d9f586e93a316845d47e3bf.tar.gz
python-mpv-dc1c4d89a5dd918c9d9f586e93a316845d47e3bf.tar.bz2
python-mpv-dc1c4d89a5dd918c9d9f586e93a316845d47e3bf.zip
:boom: breaking: Pass individual arguments to log_handler
Diffstat (limited to 'mpv.py')
-rw-r--r--mpv.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mpv.py b/mpv.py
index e25e53a..148e9a3 100644
--- a/mpv.py
+++ b/mpv.py
@@ -7,7 +7,7 @@ import sys
from warnings import warn
from functools import partial
-# vim: ts=4 sw=4
+# vim: ts=4 sw=4 et
fs_enc = sys.getfilesystemencoding()
if os.name == 'nt':
@@ -321,7 +321,7 @@ def _event_loop(event_handle, playback_cond, event_callbacks, property_handlers,
property_handlers[handlerid](pc['name'], pc['data'], pc['format'])
if eid == MpvEventID.LOG_MESSAGE and log_handler is not None:
ev = devent['event']
- log_handler('{}: {}: {}'.format(ev['level'], ev['prefix'], ev['text']))
+ log_handler(ev['level'], ev['prefix'], ev['text'])
for callback in event_callbacks:
callback(devent)
if eid == MpvEventID.SHUTDOWN:
@@ -379,7 +379,7 @@ class MPV(object):
def command(self, name, *args):
""" Execute a raw command """
args = [name.encode('utf-8')] + [ (arg if type(arg) is bytes else str(arg).encode('utf-8'))
- for arg in args if arg is not None ] + [None]
+ for arg in args if arg is not None ] + [None]
_mpv_command(self.handle, (c_char_p*len(args))(*args))
def seek(self, amount, reference="relative", precision="default-precise"):