Merge pull request #740 from kelciour/mpv-restart-fix

Fix no sound after restarting mpv
This commit is contained in:
Damien Elmes 2020-08-21 11:10:46 +10:00 committed by GitHub
commit 5d8c9c8948
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -335,6 +335,10 @@ class MpvManager(MPV, SoundOrVideoPlayer):
super().__init__(window_id=None, debug=False)
def on_init(self) -> None:
# if mpv dies and is restarted, tell Anki the
# current file is done
self.on_end_file()
try:
self.command("keybind", "q", "stop")
self.command("keybind", "Q", "stop")