jaseg / python-mpv

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

Example for player.command('stop', True) #117

Closed majuss closed 4 years ago

majuss commented 4 years ago

Hi there,

I'am looking for an example on how to call mpv cli command with added arguments. For example: player.command('stop', True) the True argument should preserve the playlist. Without an example I was not able to figure out on how to call command with appended arguments.

jaseg commented 4 years ago

Hi,

According to the man page on mpv.io the stop command accepts a "keep-playlist" flag. In python-mpv, this would be "mpv.command("stop", "keep-playlist")". Be aware that this only just landed in upstream mpv in March with upstream commit e9e93b4dbe7 . My own mpv is too old so I cannot currently test this, but it should work if your mpv is recent enough.

Best, jaseg :)

majuss commented 4 years ago

Thank you, this was exactly the problem :D compiling libmpv right now from git repo.