diff options
Diffstat (limited to 'src/avp/core.py')
| -rw-r--r-- | src/avp/core.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/avp/core.py b/src/avp/core.py index 1e9a9c3..347a5dd 100644 --- a/src/avp/core.py +++ b/src/avp/core.py @@ -426,13 +426,7 @@ class Core: from .toolkit.ffmpeg import findFfmpeg cls.wd = wd - dataDir = ( - QtCore.QStandardPaths.writableLocation( - QtCore.QStandardPaths.StandardLocation.AppConfigLocation - ) - if dataDir is None - else dataDir - ) + dataDir = cls.getConfigPath(dataDir) # Windows: C:/Users/<USER>/AppData/Local/audio-visualizer # macOS: ~/Library/Preferences/audio-visualizer # Linux: ~/.config/audio-visualizer @@ -593,3 +587,16 @@ class Core: libLog.addHandler(libLogFile) # lowest level must be explicitly set on the root Logger libLog.setLevel(0) + + @staticmethod + def getConfigPath(dataDir=None): + return ( + os.path.join( + QtCore.QStandardPaths.writableLocation( + QtCore.QStandardPaths.StandardLocation.AppConfigLocation + ), + "audio-visualizer", + ) + if dataDir is None + else dataDir + ) |
