diff --git a/README.md b/README.md
index b32c18e..b5bd36a 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-# Souncloud Music Downloader
+# Soundcloud Music Downloader
## Changelog
Current state : [Here](https://github.com/flyingrub/scdl/issues/2)
@@ -27,16 +27,16 @@ ___
> get your auth token here : http://flyingrub.tk/soundcloud/
* This permitt scdl to access to your user profile data.
-* For now scdl use it only to use `scdl.py me [OPTIONS]` instead of `scdl.py -l [url] [OPTIONS]`
+* For now scdl use it only to use `scdl me [OPTIONS]` instead of `scdl -l [url] [OPTIONS]`
* (soon) scdl will download an user's stream thanks to this
## Help
### Usage:
```
- scdl.py -l [-a | -f | -t | -p][-c][-o ][--hidewarnings][--addtofile]
- scdl.py me (-s | -a | -f | -t | -p)[-c][-o ][--hidewarnings][--addtofile]
- scdl.py -h | --help
- scdl.py --version
+ scdl -l [-a | -f | -t | -p][-c][-o ][--hidewarnings][--addtofile]
+ scdl me (-s | -a | -f | -t | -p)[-c][-o ][--hidewarnings][--addtofile]
+ scdl -h | --help
+ scdl --version
```
### Options:
@@ -54,6 +54,7 @@ ___
-o [offset] Begin with a custom offset.
--hidewarnings Hide Warnings. (use with precaution)
--addtofile Add the artist name to the filename if it isn't in the filename already
+ --path Path to download directory, can be set in the config. If none of this is set, it uses the current working directory
```
diff --git a/scdl/scdl.py b/scdl/scdl.py
index 5bcc77c..3b26c68 100755
--- a/scdl/scdl.py
+++ b/scdl/scdl.py
@@ -41,7 +41,7 @@ import json
import mutagen
token = ''
-
+path = ''
offset = 0
filename = ''
@@ -73,18 +73,22 @@ def main():
if arguments["--hidewarnings"]:
warnings.filterwarnings("ignore")
- print("no warnings!")
+ # print("no warnings!") # Warn about no warnings...?
if arguments["--path"] is not None:
if os.path.exists(arguments["--path"]):
+ print('Downloading to '+arguments["--path"]+'...')
os.chdir(arguments["--path"])
else:
- print('Invalid path...')
- sys.exit()
+ if path is not None:
+ print('Downloading to '+path+'...')
+ os.chdir(path)
+ else:
+ print('Downloading to current directory...')
print('')
if arguments["-l"]:
- parse_url(arguments[""])
+ parse_url(arguments["-l"])
elif arguments["me"]:
if arguments["-a"]:
download_all_user_tracks(who_am_i())
@@ -101,6 +105,7 @@ def get_config():
read the path where to store music
"""
global token
+ global path
config = configparser.ConfigParser()
config.read(os.path.join(os.path.expanduser('~'), '.config/scdl/scdl.cfg'))
try:
diff --git a/setup.py b/setup.py
old mode 100644
new mode 100755