mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
integrate _packagedCmd() into mpv for binary distrib
This commit is contained in:
parent
d530134218
commit
ca95552408
2 changed files with 8 additions and 1 deletions
|
@ -64,6 +64,7 @@ class MPVBase:
|
|||
"""
|
||||
|
||||
executable = find_executable("mpv")
|
||||
popenEnv = None
|
||||
|
||||
default_argv = [
|
||||
"--idle",
|
||||
|
@ -106,7 +107,7 @@ class MPVBase:
|
|||
def _start_process(self):
|
||||
"""Start the mpv process.
|
||||
"""
|
||||
self._proc = subprocess.Popen(self.argv)
|
||||
self._proc = subprocess.Popen(self.argv, env=self.popenEnv)
|
||||
|
||||
def _stop_process(self):
|
||||
"""Stop the mpv process.
|
||||
|
|
|
@ -80,7 +80,13 @@ def retryWait(proc):
|
|||
|
||||
from anki.mpv import MPV
|
||||
|
||||
mpvPath, mpvEnv = _packagedCmd(["mpv"])
|
||||
|
||||
class MpvManager(MPV):
|
||||
|
||||
executable = mpvPath[0]
|
||||
popenEnv = mpvEnv
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(window_id=None, debug=False)
|
||||
|
||||
|
|
Loading…
Reference in a new issue