aboutsummaryrefslogtreecommitdiff
path: root/src/avp/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/avp/core.py')
-rw-r--r--src/avp/core.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/avp/core.py b/src/avp/core.py
index 099b0b4..1e9a9c3 100644
--- a/src/avp/core.py
+++ b/src/avp/core.py
@@ -420,14 +420,18 @@ class Core:
Core.canceled = False
@classmethod
- def storeSettings(cls):
+ def storeSettings(cls, dataDir=None):
"""Store settings/paths to directories as class variables"""
from .__init__ import wd
from .toolkit.ffmpeg import findFfmpeg
cls.wd = wd
- dataDir = QtCore.QStandardPaths.writableLocation(
- QtCore.QStandardPaths.StandardLocation.AppConfigLocation
+ dataDir = (
+ QtCore.QStandardPaths.writableLocation(
+ QtCore.QStandardPaths.StandardLocation.AppConfigLocation
+ )
+ if dataDir is None
+ else dataDir
)
# Windows: C:/Users/<USER>/AppData/Local/audio-visualizer
# macOS: ~/Library/Preferences/audio-visualizer
@@ -589,7 +593,3 @@ class Core:
libLog.addHandler(libLogFile)
# lowest level must be explicitly set on the root Logger
libLog.setLevel(0)
-
-
-# always store settings in class variables even if a Core object is not created
-Core.storeSettings()