summaryrefslogtreecommitdiff
path: root/mpv.py
AgeCommit message (Collapse)AuthorFilesLines
2016-08-07Add filesystem encoding handlingjaseg1-6/+8
2016-08-05Remove trailing whitespace in mpv.pyjaseg1-16/+16
2016-08-05Add GL API stuffjaseg1-2/+22
2016-08-05Fix video_params list accessjaseg1-2/+2
2016-08-05Some more lowercase for readabilityjaseg1-2/+2
2016-08-04Fix event callback foojaseg1-1/+1
2016-08-04Fix log handlingjaseg1-3/+4
2016-08-04Make video-pan-x and video-pan-y floats as they should bejaseg1-2/+2
2016-08-04Fix property observe handler hash handlingjaseg1-2/+3
2016-08-02Make ynbool python2-compatiblejaseg1-3/+5
2016-07-31Make this python2 compatiblejaseg1-3/+3
2016-07-01Use ctypes.util.find_library to find libmpv. Thanks to @mozbugboxjaseg1-2/+3
2016-02-19Add testsjaseg1-32/+44
2016-02-19Properly release resources after usejaseg1-22/+38
Namely, let the event handler thread terminate itself cleanly and remove reference leak so __del__ can do its job.
2016-02-19Fix DEFAULT_ERROR_HANDLERFrechdachs1-2/+2
2016-02-19Implement '==' and '!=' for ynboolFrechdachs1-0/+3
'ynbool(True) == "yes"', 'ynbool(True) == True' and 'ynbool(True) == ynbool(True)' were not working.
2016-02-12Improve Windows supportFrechdachs1-1/+4
Windows users don't have to edit the source code anymore.
2016-02-12Fix property getter for non-available propertiesFrechdachs1-1/+2
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.
2016-02-12Fix percent-pos propertyFrechdachs1-1/+1
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.
2016-02-12Improved log handlingjaseg1-2/+13
2016-02-09Fix unobserve_propertyFrechdachs1-2/+6
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.
2016-02-08Add observe_property supportjaseg1-111/+138
2016-01-04Remove asyncio for windows supportjaseg1-22/+7
2015-11-01Fixed accidental python2-ism in ynbool. Fixes #1jaseg1-2/+2
Thanks to u8sand from github for this.
2015-05-10Small beautificationsjaseg1-494/+492
2014-08-14Fixed encoding handling to use the system's default encodingjaseg1-9/+11
2014-08-14Removed a bunch of asserts and added some docjaseg1-13/+10
Now leaving command parameter value checking to libmpv.
2014-08-13Added support for yet-unknown error codesjaseg1-488/+497
2014-08-13Added optional loading of libluajaseg1-0/+5
2014-08-10Initial commitjaseg1-0/+594