mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
another attempt to preventing mpv from accessing standard config
https://github.com/dae/anki/pull/296
This commit is contained in:
parent
1a5322a396
commit
5dd7fc8c6e
1 changed files with 7 additions and 4 deletions
|
@ -90,10 +90,6 @@ from anki.mpv import MPV, MPVBase
|
||||||
|
|
||||||
mpvPath, mpvEnv = _packagedCmd(["mpv"])
|
mpvPath, mpvEnv = _packagedCmd(["mpv"])
|
||||||
|
|
||||||
def setMpvConfigBase(base):
|
|
||||||
global mpvEnv
|
|
||||||
mpvEnv['XDG_CONFIG_HOME'] = base
|
|
||||||
|
|
||||||
class MpvManager(MPV):
|
class MpvManager(MPV):
|
||||||
|
|
||||||
executable = mpvPath[0]
|
executable = mpvPath[0]
|
||||||
|
@ -125,6 +121,13 @@ class MpvManager(MPV):
|
||||||
def on_idle(self):
|
def on_idle(self):
|
||||||
runHook("mpvIdleHook")
|
runHook("mpvIdleHook")
|
||||||
|
|
||||||
|
def setMpvConfigBase(base):
|
||||||
|
mpvConfPath = os.path.join(base, "mpv.conf")
|
||||||
|
MpvManager.default_argv += [
|
||||||
|
"--no-config",
|
||||||
|
"--include="+mpvConfPath,
|
||||||
|
]
|
||||||
|
|
||||||
mpvManager = None
|
mpvManager = None
|
||||||
|
|
||||||
def setupMPV():
|
def setupMPV():
|
||||||
|
|
Loading…
Reference in a new issue