[WIP] Refactor spotdl.py; introduced classes (#410)

* Refactor spotdl.py; introduced classes

* introduce CheckExists class

* Move these classes to download.py

* Fix refresh_token

* Add a changelog entry
This commit is contained in:
Ritiek Malhotra
2018-11-25 17:07:56 +05:30
committed by GitHub
parent 8ced90cb39
commit eae9316cee
13 changed files with 315 additions and 217 deletions

View File

@@ -1,7 +1,7 @@
import os
from spotdl import const
from spotdl import spotdl
from spotdl import downloader
import loader
@@ -16,5 +16,6 @@ def test_dry_download_list(tmpdir):
file_path = os.path.join(const.args.folder, "test_list.txt")
with open(file_path, "w") as f:
f.write(TRACK_URL)
downloaded_song, *_ = spotdl.download_list(file_path)
list_dl = downloader.ListDownloader(file_path)
downloaded_song, *_ = list_dl.download_list()
assert downloaded_song == TRACK_URL