Use platformdirs for default input and output dirs
This commit is contained in:
parent
0b445cd382
commit
0af753ea1f
1 changed files with 3 additions and 2 deletions
|
@ -1,13 +1,14 @@
|
||||||
import json
|
import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from platformdirs import user_documents_path
|
||||||
from typing import Tuple, Optional
|
from typing import Tuple, Optional
|
||||||
from srtify.core.models import AppSettings, ApiConfig, DirectoryConfig, TranslationConfig
|
from srtify.core.models import AppSettings, ApiConfig, DirectoryConfig, TranslationConfig
|
||||||
from srtify.utils.paths import get_config_path
|
from srtify.utils.paths import get_config_path
|
||||||
|
|
||||||
|
|
||||||
home_dir = Path.home()
|
home_dir = Path.home()
|
||||||
DEFAULT_INPUT_DIR = str(home_dir / "Documents" / "Subtitles")
|
DEFAULT_INPUT_DIR = str(user_documents_path() / "Subtitles")
|
||||||
DEFAULT_OUTPUT_DIR = str(home_dir / "Documents" / "Subtitles" / "Translated")
|
DEFAULT_OUTPUT_DIR = str(user_documents_path() / "Subtitles" / "Translated")
|
||||||
|
|
||||||
|
|
||||||
class SettingsManager:
|
class SettingsManager:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue