💥 breaking: Pass individual arguments to log_handler
This commit is contained in:
parent
14bb2c3223
commit
dc1c4d89a5
1 changed files with 3 additions and 3 deletions
4
mpv.py
4
mpv.py
|
|
@ -7,7 +7,7 @@ import sys
|
||||||
from warnings import warn
|
from warnings import warn
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
# vim: ts=4 sw=4
|
# vim: ts=4 sw=4 et
|
||||||
fs_enc = sys.getfilesystemencoding()
|
fs_enc = sys.getfilesystemencoding()
|
||||||
|
|
||||||
if os.name == 'nt':
|
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'])
|
property_handlers[handlerid](pc['name'], pc['data'], pc['format'])
|
||||||
if eid == MpvEventID.LOG_MESSAGE and log_handler is not None:
|
if eid == MpvEventID.LOG_MESSAGE and log_handler is not None:
|
||||||
ev = devent['event']
|
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:
|
for callback in event_callbacks:
|
||||||
callback(devent)
|
callback(devent)
|
||||||
if eid == MpvEventID.SHUTDOWN:
|
if eid == MpvEventID.SHUTDOWN:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue