From a3473599316779b04a30de4a01bf893a68428219 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Tue, 23 Jan 2024 09:51:59 +0100 Subject: ♻️ Renaming done to avoid confusion. 🛠️ Fixed config persisting error after read, if config file did not exist before (fixes #20). ✨ Implemented PKCE authorization to enable HiRes FLAC downloads. Fixes #9. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/helper/path.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tidal_dl_ng/helper/path.py') diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py index a2ce98c..373f78c 100644 --- a/tidal_dl_ng/helper/path.py +++ b/tidal_dl_ng/helper/path.py @@ -23,7 +23,7 @@ def path_home() -> str: return os.path.abspath("./") -def path_base() -> str: +def path_config_base() -> str: path_config: str = ".config" path_base: str = os.path.join(path_home(), path_config, __name_display__) @@ -34,30 +34,30 @@ def path_file_log() -> str: # TODO: Remove this soon. Only for migration to new dir. old = os.path.join(path_home(), ".tidal-dl-ng.log") if os.path.isfile(old): - os.makedirs(path_base(), exist_ok=True) - os.rename(old, os.path.join(path_base(), "app.log")) + os.makedirs(path_config_base(), exist_ok=True) + os.rename(old, os.path.join(path_config_base(), "app.log")) - return os.path.join(path_base(), "app.log") + return os.path.join(path_config_base(), "app.log") def path_file_token() -> str: # TODO: Remove this soon. Only for migration to new dir. old = os.path.join(path_home(), ".tidal-dl-ng_token.json") if os.path.isfile(old): - os.makedirs(path_base(), exist_ok=True) - os.rename(old, os.path.join(path_base(), "token.json")) + os.makedirs(path_config_base(), exist_ok=True) + os.rename(old, os.path.join(path_config_base(), "token.json")) - return os.path.join(path_base(), "token.json") + return os.path.join(path_config_base(), "token.json") def path_file_settings() -> str: # TODO: Remove this soon. Only for migration to new dir. old = os.path.join(path_home(), ".tidal-dl-ng_settings.json") if os.path.isfile(old): - os.makedirs(path_base(), exist_ok=True) - os.rename(old, os.path.join(path_base(), "settings.json")) + os.makedirs(path_config_base(), exist_ok=True) + os.rename(old, os.path.join(path_config_base(), "settings.json")) - return os.path.join(path_base(), "settings.json") + return os.path.join(path_config_base(), "settings.json") def format_path_media(fmt_template: str, media: Track | Album | Playlist | UserPlaylist | Video | Mix) -> str: -- cgit v1.3.1