From 93244e46ec405eaff4609a10a92512af7c14a4a0 Mon Sep 17 00:00:00 2001 From: Ritiek Date: Sun, 25 Jun 2017 01:16:04 +0530 Subject: [PATCH] Fix download test --- core/convert.py | 1 + spotdl.py | 2 ++ test/test_basic.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/convert.py b/core/convert.py index d8fc717..32cd749 100644 --- a/core/convert.py +++ b/core/convert.py @@ -11,6 +11,7 @@ def song(input_song, output_song, avconv, verbose): else: convert_with_FFmpeg(input_song, output_song, verbose) os.remove('Music/' + input_song) + return True def convert_with_avconv(input_song, output_song, verbose): # different path for windows diff --git a/spotdl.py b/spotdl.py index e80905d..8db4352 100755 --- a/spotdl.py +++ b/spotdl.py @@ -262,6 +262,8 @@ def grab_single(raw_song, number=None): class Args(object): manual = False + input_ext = '.m4a' + output_ext = '.mp3' args = Args() # token is mandatory when using Spotify's API diff --git a/test/test_basic.py b/test/test_basic.py index cc989f0..b9325c6 100644 --- a/test/test_basic.py +++ b/test/test_basic.py @@ -31,5 +31,5 @@ def test_check_exists(): def test_download(): expect_download = True content = spotdl.go_pafy(raw_song) - download = download_song(content) + download = spotdl.download_song(content) assert download == expect_download