mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
add --config flag to modify config path
+ use getters instead of constants in settings classes + refactor previous references + move get_xdg_config_dir() from settings.py to app.utils.xdg_utils.py
This commit is contained in:
+2
-2
@@ -33,7 +33,7 @@ class CopyFiles:
|
||||
files = [
|
||||
{
|
||||
"src": assets_dir,
|
||||
"dest": os.path.join(settings.Paths.APP_DIR, "assets"),
|
||||
"dest": os.path.join(settings.Paths.get_app_dir(), "assets"),
|
||||
"is_dir": True,
|
||||
}
|
||||
]
|
||||
@@ -83,7 +83,7 @@ def create_config_dir() -> None:
|
||||
]
|
||||
|
||||
for _dir in dirs:
|
||||
path = os.path.join(settings.Paths.APP_DIR, _dir)
|
||||
path = os.path.join(settings.Paths.get_app_dir(), _dir)
|
||||
exists = os.path.exists(path)
|
||||
|
||||
if not exists:
|
||||
|
||||
+2
-2
@@ -19,8 +19,8 @@ def setup_sqlite():
|
||||
|
||||
run_preinit_migrations()
|
||||
|
||||
app_db_conn = create_connection(Db.APP_DB_PATH)
|
||||
playlist_db_conn = create_connection(Db.USERDATA_DB_PATH)
|
||||
app_db_conn = create_connection(Db.get_app_db_path())
|
||||
playlist_db_conn = create_connection(Db.get_userdata_db_path())
|
||||
|
||||
create_tables(app_db_conn, queries.CREATE_APPDB_TABLES)
|
||||
create_tables(playlist_db_conn, queries.CREATE_USERDATA_TABLES)
|
||||
|
||||
Reference in New Issue
Block a user