summaryrefslogtreecommitdiff
path: root/tidal_dl_ng/config.py
diff options
context:
space:
mode:
authorexislow <exislow@users.noreply.github.com>2024-11-11 12:08:44 +0100
committerGitHub <noreply@github.com>2024-11-11 12:08:44 +0100
commit4cef07b08f16410f56fa53a34884ce3b5dd6b64e (patch)
tree9576c99fa4dba32b3a8bb078fd4801cc8548ff8c /tidal_dl_ng/config.py
parent6732c5e15e3e72b0b671f5a5d60dbd482c184173 (diff)
parent4d2048acbdba035153b52aa83d9dc52d65858a0c (diff)
downloadtidal-dl-ng-4cef07b08f16410f56fa53a34884ce3b5dd6b64e.tar.gz
Merge pull request #226 from exislow/gui-enhancement
Gui enhancement
Diffstat (limited to 'tidal_dl_ng/config.py')
-rw-r--r--tidal_dl_ng/config.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tidal_dl_ng/config.py b/tidal_dl_ng/config.py
index a3ab809..1d17953 100644
--- a/tidal_dl_ng/config.py
+++ b/tidal_dl_ng/config.py
@@ -1,3 +1,4 @@
+import json
import os
import shutil
from collections.abc import Callable
@@ -31,7 +32,9 @@ class BaseConfig:
os.makedirs(self.path_base, exist_ok=True)
with open(self.file_path, encoding="utf-8", mode="w") as f:
- f.write(data_json)
+ # Save it in a pretty format
+ obj_json_config = json.loads(data_json)
+ json.dump(obj_json_config, f, indent=4)
def set_option(self, key: str, value: Any) -> None:
value_old: Any = getattr(self.data, key)