From b283aa418a1c0016a63a328fec6259dfe110cefe Mon Sep 17 00:00:00 2001 From: Brianna Rainey Date: Thu, 29 Jan 2026 16:30:43 -0500 Subject: fix `settings.ini` not located in correct path --- src/avp/core.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/avp/core.py') 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//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 + ) -- cgit v1.2.3