Skip to content

Commit

Permalink
💥 breaking: Call observe_property handler with correct type arg
Browse files Browse the repository at this point in the history
  • Loading branch information
jaseg committed Aug 7, 2016
1 parent 1bde43a commit 1feab17
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mpv.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,12 @@ def _event_loop(event_handle, playback_cond, event_callbacks, property_handlers,
if eid == MpvEventID.PROPERTY_CHANGE:
pc, handlerid = devent['event'], devent['reply_userdata']&0Xffffffffffffffff
if handlerid in property_handlers:
name = pc['name']
if 'value' in pc:
property_handlers[handlerid](pc['name'], pc['value'])
proptype, _access = ALL_PROPERTIES[name]
property_handlers[handlerid](name, proptype(_ensure_encoding(pc['value'])))
else:
property_handlers[handlerid](pc['name'], pc['data'], pc['format'])
property_handlers[handlerid](name, pc['data'], pc['format'])
if eid == MpvEventID.LOG_MESSAGE and log_handler is not None:
ev = devent['event']
log_handler(ev['level'], ev['prefix'], ev['text'])
Expand Down

0 comments on commit 1feab17

Please sign in to comment.