another attempt to preventing mpv from accessing standard config

https://github.com/dae/anki/pull/296
This commit is contained in:
Damien Elmes 2019-04-09 15:32:44 +10:00
parent 1a5322a396
commit 5dd7fc8c6e

View file

@ -90,10 +90,6 @@ from anki.mpv import MPV, MPVBase
mpvPath, mpvEnv = _packagedCmd(["mpv"])
def setMpvConfigBase(base):
global mpvEnv
mpvEnv['XDG_CONFIG_HOME'] = base
class MpvManager(MPV):
executable = mpvPath[0]
@ -125,6 +121,13 @@ class MpvManager(MPV):
def on_idle(self):
runHook("mpvIdleHook")
def setMpvConfigBase(base):
mpvConfPath = os.path.join(base, "mpv.conf")
MpvManager.default_argv += [
"--no-config",
"--include="+mpvConfPath,
]
mpvManager = None
def setupMPV():