Add a config option to preserve spaces in file names (#201)

* Add a config option to preserve spaces in file names

* Typo

* Fix replacing in path
This commit is contained in:
Miguel Piedrafita
2018-01-15 09:11:11 +01:00
committed by Ritiek Malhotra
parent e283231f8e
commit 1fe94c9896
3 changed files with 11 additions and 12 deletions

View File

@@ -129,6 +129,8 @@ optional arguments:
-d, --dry-run Show only track title and YouTube URL (default: False)
-mo, --music-videos-only
Search only for music on Youtube (default: False)
-ps, --preserve-spaces
Preserve spaces on file names (default: False)
-ll {INFO,WARNING,ERROR,DEBUG}, --log-level {INFO,WARNING,ERROR,DEBUG}
set log verbosity (default: INFO)
```
@@ -244,18 +246,6 @@ If you don't want to download all the songs to the `Music/` folder relative to t
E.g. `$ python3 spotdl.py -s "adele hello" -f "/home/user/Music/"`.
This works with both relative and absolute paths.
#### Preserve Spaces in File Names
Beside some other characters, spaces will be replaced by underscores.
There's no option to change this behavior in spotify-downloader itself,
but on Unix-based operating systems you can issue the following bash
command after downloading is done:
```
$ find . -type f -name "*.mp3" -exec bash -c 'mv "$0" "${0//_/ }"' {} \;
```
Just make sure your working directory is the one you have the music files in.
## Config File
At first run, this tool will generate a `config.yml` in root directory