summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaglis Jonaitis <naglis@mailbox.org>2022-05-16 00:54:41 +0300
committerjaseg <136313+jaseg@users.noreply.github.com>2022-06-17 00:11:56 +0200
commitdd4d016de8eb7f79c9fa0810e9e3dc59f949a2de (patch)
treeeb1b13f41fd5ab64d0219fdd9fb87c72e007be25
parent1c0340e2d7521623fcdd18e751d1a63a311c556e (diff)
downloadpython-mpv-dd4d016de8eb7f79c9fa0810e9e3dc59f949a2de.tar.gz
python-mpv-dd4d016de8eb7f79c9fa0810e9e3dc59f949a2de.tar.bz2
python-mpv-dd4d016de8eb7f79c9fa0810e9e3dc59f949a2de.zip
Fix external subtitles example
Currently, running the example results in: > TypeError: MPV.play() got an unexpected keyword argument 'sub_file'
-rw-r--r--README.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/README.rst b/README.rst
index 3af7d9d..1f61efe 100644
--- a/README.rst
+++ b/README.rst
@@ -241,7 +241,8 @@ The easiest way to load custom subtitles from a file is to pass the ``--sub-file
import mpv
player = mpv.MPV()
- player.play('test.webm', sub_file='test.srt')
+ player.loadfile('test.webm', sub_file='test.srt')
+ player.wait_for_playback()
Note that you can also pass many other options to ``loadfile``. See the mpv docs for details.