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

User Defined lua Scripts within python-mpv #158

Closed CalculusAce closed 3 years ago

CalculusAce commented 3 years ago

Is there a method to be able to use user defined lua scripts from within python-mpv? In a normal install of mpv, it is possible to install user scripts by adding them to the .../AppData/Roaming/mpv/scripts directory on Windows for example. Thanks!

jaseg commented 3 years ago

Yes, you can load lua scripts from python-mpv. But, by default, libmpv/python-mpv do not load either the user's config or scripts from the user's config directory, since libmpv/python-mpv are meant for embedding and a custom config could interfere with that.

To load a specific script from your python code, have a look at this issue comment: https://github.com/jaseg/python-mpv/issues/124#issuecomment-660623068

To override libmpv's default and actually load the user's config and scripts as if running the mpv binary from the command line, have a look here: https://github.com/jaseg/python-mpv/issues/137#issuecomment-699676009

jaseg commented 3 years ago

I'm closing this issue because it seems it is resolved.