mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
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:
parent
0d6d7b9bad
commit
8775314e36
2 changed files with 7 additions and 0 deletions
|
@ -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]
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue