jaseg / python-mpv

Python interface to the awesome mpv media player
https://git.jaseg.de/python-mpv.git
Other
543 stars 68 forks source link

possible typo #166

Closed ghost closed 1 year ago

ghost commented 3 years ago

When I call the _wait_untilplaying or _wait_untilpaused method from an MPV instance I get a TypeError. These two methods call _self.wait_forproperty('core-idle') I believe the attribute core-idle should be _coreidle? -> mpv.py line 906 and 917

neinseg commented 3 years ago

Thank you for the report.

No, the property is called "core-idle" in libmpv. libmpv uses dashes for all property names. When observing a property through the observer API the name is directly passed through to libmpv. The underscore variants of property names are only used for accessing properties through the MPV object's attributes, since python attribute names cannot contain dashes.

Could you please post a stack trace from the error that you get and post your libmpv version? If you have trouble figuring out your libmpv version you can read it from python like this: python3 -c 'import mpv; print(mpv.MPV().mpv_version)'.