Age | Commit message (Collapse) | Author | Files | Lines |
|
Namely, let the event handler thread terminate itself cleanly and remove
reference leak so __del__ can do its job.
|
|
|
|
'ynbool(True) == "yes"', 'ynbool(True) == True' and 'ynbool(True) == ynbool(True)' were not working.
|
|
Windows users don't have to edit the source code anymore.
|
|
Properties which are not currently available weren't handled properly: The getter for a property that is not available with proptype 'str' would return "None" (as a string) instead of None. Trying to retrieve a non-available property with proptype 'int' would raise a TypeError, because the getter tries to call 'int(None)'. An alternative would be to raise some kind of exception for non-available properties, but I would prefer the getter to return None. For example None should be a valid value for the property 'path' if no video is loaded yet.
|
|
The 'percent-pos' property has to be float. Trying to retrieve this property was raising an exception, because e.g. 'int("0.0000")' raises a ValueError.
|
|
|
|
There were three problems:
1. MPV.unobserve_property called _mpv_observe_property instead of _mpv_unobserve_property.
2. _mpv_unobserve_property returns the number of properties that were assigned to the handler that is being removed. Because the return value is not 0 in such a case, ErrorCode.raise_for_ec tries to raise an error. To fix that, I changed the ErrorCode.raise_for_ec functon not to raise an error if ec is larger than 0. (If there is a positive return value, there should not have been an error anyway, if I'm not mistaken.)
3. Calling MPV.unobserve_property for a handle that is not currently been used, should not result in a KeyError being raised.
An alternative to 2. would be to add a restype to the _handle_func of 'mpv_unobserve_property' and returning that value in MPV.unobserve_property. (That way, raise_for_ec is never called.) But I don't think this value is useful in any way. Even the built in lua interface does not return that value.
|
|
|
|
|
|
Thanks to u8sand from github for this.
|
|
|
|
|
|
|
|
Now leaving command parameter value checking to libmpv.
|
|
|
|
|
|
|