Commit graph

86 commits

Author SHA1 Message Date
jaseg
8f5f5c645b Fix MpvNode logic to use pröper unions
...instead of lots manual ctypes pointer casting
2017-12-24 22:43:13 +01:00
Vilius Grigaliūnas
345ffb1998 Fixed TypeError: _handle_key_binding_message() signature incompatibility with mpv < v0.15.0
key-binding message has key name parameter only since mpv version 0.15.0 (as stated in manual), therefore trying to bind keys with earlier versions results in TypeError: _handle_key_binding_message() missing 1 required positional argument: 'key_name'.

This change makes this argument optional and default to None.
2017-09-18 20:21:58 +03:00
jaseg
901e42042b Nicer API names for add/multiply/cycle property
add: _add_property -> property_add
multiply: _multiply_property -> property_multiply
cycle: _cycle_property -> cycle
2017-09-14 12:07:11 +02:00
jaseg
dcf75e604c Wrap all docstrings to 120 char line width
This is to stay consistent with everything else.
2017-09-14 12:03:50 +02:00
Raphael McSinyx
fa125c6604 Reformat doctrings to follow PEP 257 and use reStructuredText 2017-09-13 15:46:13 +07:00
Raphael McSinyx
9f4b31f166 Fix add, cycle and multiply command. 2017-09-13 15:17:30 +07:00
jaseg
2ca5c7b9c8 Add on_key_press 2017-08-21 15:36:03 +02:00
jaseg
7f929b09fe Fix key binding registration for bound methods, add unit tests 2017-08-20 23:37:18 +02:00
jaseg
1c6d74dd91 Fix window dragging while using custom key bindings
closes #45
2017-08-20 23:12:20 +02:00
jaseg
13191bfeb9 mpv, mpv-test: Fix vim mode lines 2017-08-06 22:28:01 +02:00
jaseg
22373ba7ba Restore compatibility with older libmpv versions
At least v0.26.0 also works with the unfixed version
2017-08-06 21:45:19 +02:00
jaseg
d21cfa2812 mpv.py: Un-break property write access 2017-08-06 21:16:09 +02:00
jaseg
48eb88ef54 Add pillow-based screenshot_raw command 2017-08-03 12:39:44 +02:00
jaseg
1582390031 Move to fully FORMAT_NODE-based API
This will break lots of stuff.
* Use MPV_FORMAT_NODE mostly everywhere
* Dynamically discover properties instead of using a static list
* Modify encoding handling to be more versatile
2017-08-03 12:36:21 +02:00
jaseg
e0591798f2 Fixes for libmpv v0.26.0 2017-08-03 00:53:27 +02:00
jaseg
e29d499f18 mpv module: Remove load_lua
It wouldn't work on all systems anyway due to differing names for liblua
("liblua.so", "liblua-5.1.so" etc.) and also doesn't seem to be
necessary anymore.
2017-08-02 10:46:36 +02:00
jaseg
7dc375f85c MPV constructor: Add loglevel argument 2017-08-02 10:46:13 +02:00
jaseg
0eb1ee8dab Fix register_event_callback to work with methods 2017-07-23 14:45:00 +02:00
jaseg
121575f814 Remove debug hack accidentially left in the code 2017-07-13 00:40:31 +02:00
jaseg
e52a9545f7 Fix message handler registration and advanced README example 2017-07-13 00:37:25 +02:00
jaseg
a80f638732 Make compatible with libmpv 0.22.0 2017-07-03 13:13:50 +02:00
jaseg
03492ba394 Add support for string-array options 2017-07-03 12:25:27 +02:00
jaseg
11f534897c mpv-test: Fix some tests, add property observer decorator test
Also fix ass-style-override
2017-05-26 14:02:24 +02:00
Matt Deacalion Stevens
b1f81ac561
Fix unobserve_property RuntimeError 2017-05-21 10:58:36 +01:00
jaseg
5ca3a0250c Fix typo in register_key_binding 2017-05-20 22:34:08 +02:00
jaseg
b2993ceaaa Add property observer format override 2017-05-11 15:49:11 +02:00
jaseg
c47bd2a2c6 BREAKING: Move property observation API to NODE format 2017-05-10 18:29:41 +02:00
jaseg
303eedbb3b Add documentation and polish handler registration 2017-05-10 14:05:10 +02:00
jaseg
7a378544d5 MPV.event_callback: Allow str event type names 2017-05-10 12:14:43 +02:00
jaseg
d2ffe25700 Update properties for current upstream master 2017-05-10 11:56:00 +02:00
jaseg
f55b62667f Add OSD property access 2017-05-10 11:56:00 +02:00
jaseg
ab773a5934 Add callback/message handler decorators 2017-05-10 11:55:42 +02:00
jaseg
28fdc21a24 Organize convenience functions 2017-05-07 15:58:58 +02:00
jaseg
9a9a8bb2c9 Add playlist_append porcelain 2017-05-07 15:34:36 +02:00
jaseg
32b5fb8627 Add license header 2017-05-07 15:29:02 +02:00
Hans Ole Hatzel
60b5530942 Add playlist_filenames property
Closes #21
2017-05-06 12:42:41 +02:00
jaseg
8b9411ec54 Simplify initialization logic somewhat 2017-01-06 14:41:46 +01:00
Frechdachs
9cc3a25c73 Make sure _mpv_initialize is called before _mpv_terminate_destroy 2017-01-06 13:52:50 +01:00
jaseg
9fa18058ad Make so/DLL loading more robust
* Print a proper error message if shared object not found on unix
* Abide by local conventions and look for DLL in script's directory on windows
2017-01-04 12:46:17 +01:00
jaseg
eb8b6a05d7 Clarify event thread handling in the README 2016-11-23 10:20:49 +01:00
jaseg
efbf182723 Fix MPV.terminate so it can be called from event handlers 2016-09-15 02:00:28 +02:00
jaseg
1ee4361bdd Pimp loadfile to accept per-file options 2016-08-20 11:20:20 +02:00
jaseg
669c4bbfec BREAKING 💥 Improve property handling 2016-08-20 09:54:53 +02:00
jaseg
be8d6897eb Fix key binding handling for duplicate bindings and commands 2016-08-19 18:52:37 +02:00
jaseg
aaddc52da4 Set LC_NUMERIC to C to avoid segfaults on some platforms 2016-08-19 17:54:32 +02:00
jaseg
ab8b8b5477 Improve event handling, add message handling, add key binding foo 2016-08-17 23:21:19 +02:00
jaseg
de7b671103 Finally add node handling, fix ALL THE THINGS
* New node handling
 * Add remaining properties
 * Improve property type handling (no more ynbool!)
 * Add pröper option access
 * Add a whole bunch of tests
2016-08-13 19:14:14 +02:00
jaseg
4d6c17d342 WIP 2016-08-13 18:19:39 +02:00
jaseg
97d929e27f Add loads of new properties 2016-08-13 01:30:03 +02:00
jaseg
adfe131be9 Improve flag handling 2016-08-13 01:28:33 +02:00