Merge pull request #1221 from kelciour/audio-pause-fix

Audio pause fix
This commit is contained in:
Damien Elmes 2021-06-08 09:23:11 +10:00 committed by GitHub
commit 0c69854b71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -89,8 +89,8 @@ class MPVBase:
"--ontop",
"--audio-display=no",
"--keep-open=no",
"--reset-on-next-file=pause",
"--autoload-files=no",
"--gapless-audio=no",
]
def __init__(self, window_id=None, debug=False):

View file

@ -402,14 +402,14 @@ class MpvManager(MPV, SoundOrVideoPlayer):
filename = hooks.media_file_filter(tag.filename)
path = os.path.join(os.getcwd(), filename)
self.command("loadfile", path, "append-play")
self.command("loadfile", path, "append-play", "pause=no")
gui_hooks.av_player_did_begin_playing(self, tag)
def stop(self) -> None:
self.command("stop")
def toggle_pause(self) -> None:
self.set_property("pause", not self.get_property("pause"))
self.command("cycle", "pause")
def seek_relative(self, secs: int) -> None:
self.command("seek", secs, "relative")