mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
Better approach for detemining the correct configuration folder for Linux and MacOS, using platformdirs
This commit is contained in:
+1
-6
@@ -1,6 +1 @@
|
|||||||
- Merge pull request [#7](https://github.com/denizsafak/abogen/pull/7) by [@jborza](https://github.com/jborza) that improves voice preview and documentation.
|
- Better approach for detemining the correct configuration folder for Linux and MacOS, using platformdirs.
|
||||||
- Fixed the issue when a voice is selected, the voice mixer tries to pre-select that voice and ignores existing profiles.
|
|
||||||
- Fixed the error while renaming the default "New profile" in the voice mixer.
|
|
||||||
- Fixed subtitle_combo enabling/disabling when a voice in the voice mixer is selected.
|
|
||||||
- Prevented using special characters in the profile name to avoid conflicts.
|
|
||||||
- Improved invalid profile handling in the voice mixer.
|
|
||||||
+3
-4
@@ -66,10 +66,9 @@ def get_version():
|
|||||||
|
|
||||||
# Define config path
|
# Define config path
|
||||||
def get_user_config_path():
|
def get_user_config_path():
|
||||||
if os.name == "nt":
|
from platformdirs import user_config_dir
|
||||||
config_dir = os.path.join(os.environ["APPDATA"], "abogen")
|
# Use platformdirs to get the user configuration directory
|
||||||
else:
|
config_dir = user_config_dir("abogen", appauthor=False, roaming=True)
|
||||||
config_dir = os.path.join(os.path.expanduser("~"), ".config", "abogen")
|
|
||||||
os.makedirs(config_dir, exist_ok=True)
|
os.makedirs(config_dir, exist_ok=True)
|
||||||
return os.path.join(config_dir, "config.json")
|
return os.path.join(config_dir, "config.json")
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
from utils import get_user_config_path, get_resource_path
|
from utils import get_user_config_path
|
||||||
|
|
||||||
|
|
||||||
def _get_profiles_path():
|
def _get_profiles_path():
|
||||||
|
|||||||
Reference in New Issue
Block a user