mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
Changes as per second PR review
This commit is contained in:
@@ -141,7 +141,7 @@ optional arguments:
|
|||||||
-ll {INFO,WARNING,ERROR,DEBUG}, --log-level {INFO,WARNING,ERROR,DEBUG}
|
-ll {INFO,WARNING,ERROR,DEBUG}, --log-level {INFO,WARNING,ERROR,DEBUG}
|
||||||
set log verbosity (default: INFO)
|
set log verbosity (default: INFO)
|
||||||
-c CONFIG_FILE_PATH --config CONFIG_FILE_PATH
|
-c CONFIG_FILE_PATH --config CONFIG_FILE_PATH
|
||||||
path to custom config.yml file
|
Replace with custom config.yml file (default: None)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Download by Name
|
#### Download by Name
|
||||||
@@ -265,7 +265,7 @@ Also note that config options are overridden by command-line arguments.
|
|||||||
|
|
||||||
#### Specify the Custom Config File Path
|
#### Specify the Custom Config File Path
|
||||||
|
|
||||||
If you want to use custom `config.yml` instead of default one, you can use `-c`/`--config` option.
|
If you want to use custom `.yml` configuration instead of the default one, you can use `-c`/`--config` option.
|
||||||
E.g. `$ python3 spotdl.py -s "adele hello" -c "/home/user/customConfig.yml"`
|
E.g. `$ python3 spotdl.py -s "adele hello" -c "/home/user/customConfig.yml"`
|
||||||
|
|
||||||
## [Docker Image](https://hub.docker.com/r/ritiek/spotify-downloader/)
|
## [Docker Image](https://hub.docker.com/r/ritiek/spotify-downloader/)
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ def merge(default, config):
|
|||||||
merged.update(config)
|
merged.update(config)
|
||||||
return merged
|
return merged
|
||||||
|
|
||||||
|
|
||||||
def get_config(config_file):
|
def get_config(config_file):
|
||||||
try:
|
try:
|
||||||
with open(config_file, 'r') as ymlfile:
|
with open(config_file, 'r') as ymlfile:
|
||||||
@@ -73,6 +74,7 @@ def override_config(config_file, parser, raw_args=None):
|
|||||||
|
|
||||||
return parser.parse_args(raw_args)
|
return parser.parse_args(raw_args)
|
||||||
|
|
||||||
|
|
||||||
def get_arguments(raw_args=None, to_group=True, to_merge=True):
|
def get_arguments(raw_args=None, to_group=True, to_merge=True):
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='Download and convert songs from Spotify, Youtube etc.',
|
description='Download and convert songs from Spotify, Youtube etc.',
|
||||||
|
|||||||
Reference in New Issue
Block a user