mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -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"])
|
||||
|
||||
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():
|
||||
|
|
Loading…
Reference in a new issue