use custom mpv config folder

not the first time the default location has caused problems for users
https://anki.tenderapp.com/discussions/ankidesktop/29531-bug-ankis-version-of-mpv-loads-mpvconf-from-configmpv-on-macos
This commit is contained in:
Damien Elmes 2018-09-24 16:26:08 +10:00
parent 0d6d7b9bad
commit 8775314e36
2 changed files with 7 additions and 0 deletions

View file

@ -88,6 +88,10 @@ 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]

View file

@ -22,6 +22,7 @@ from aqt.utils import showWarning
from aqt import appHelpSite
import aqt.forms
from send2trash import send2trash
import anki.sound
metaConf = dict(
ver=0,
@ -67,6 +68,8 @@ class ProfileManager:
# instantiate base folder
self._setBaseFolder(base)
anki.sound.setMpvConfigBase(self.base)
def setupMeta(self):
# load metadata
self.firstRun = self._loadMeta()