From 6f03be91e24217dccc1747ac2a97d8696af81f6a Mon Sep 17 00:00:00 2001 From: nathom Date: Thu, 24 Jun 2021 22:51:30 -0700 Subject: [PATCH] Fix #104 Signed-off-by: nathom --- streamrip/config.py | 7 ++++--- streamrip/config.toml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/streamrip/config.py b/streamrip/config.py index 83fef77..56226e6 100644 --- a/streamrip/config.py +++ b/streamrip/config.py @@ -10,8 +10,7 @@ from typing import Any, Dict import click import tomlkit -from . import __version__ -from .constants import CONFIG_DIR, CONFIG_PATH +from .constants import CONFIG_DIR, CONFIG_PATH, DOWNLOADS_DIR from .exceptions import InvalidSourceError logger = logging.getLogger("streamrip") @@ -64,7 +63,9 @@ class Config: self.load() else: logger.debug("Creating toml config file at '%s'", self._path) - shutil.copy(self.default_config_path, CONFIG_PATH) + shutil.copy(self.default_config_path, self._path) + self.load() + self.file["downloads"]["folder"] = DOWNLOADS_DIR def update(self): """Reset the config file except for credentials.""" diff --git a/streamrip/config.toml b/streamrip/config.toml index 3c38224..9da2d06 100644 --- a/streamrip/config.toml +++ b/streamrip/config.toml @@ -1,6 +1,6 @@ [downloads] # Folder where tracks are downloaded to -folder = "/Users/nathan/StreamripDownloads" +folder = "" # Put Qobuz albums in a 'Qobuz' folder, Tidal albums in 'Tidal' etc. source_subdirectories = false # Download (and convert) tracks all at once, instead of sequentially.