Fixed issue #11

This commit is contained in:
Kepoor Hampond 2017-03-17 23:25:44 -07:00
parent df86541d62
commit 42b5818d1b
3 changed files with 11 additions and 10 deletions

View file

@ -288,6 +288,7 @@ class Ripper:
if data == {}:
data = self.parse_song_data(song, artist)
if data != {}:
song = data["name"]
artist = data["artist"]

View file

@ -40,7 +40,7 @@ def blank(string, downcase=True):
regex = re.compile('[^a-zA-Z0-9\ ]')
string = regex.sub('', string)
if downcase: string = string.lower()
return string
return ' '.join(string.split())
def blank_include(this, includes_this):
this = blank(this)
@ -300,10 +300,10 @@ from .config import CONFIG
def check_sources(ripper, key, default=None, environment=False, where=None):
tmp_args = ripper.args
if where != None and ripper.args.get(where):
tmp_args = ripper.args.get(where)
tmp_args = ripper.args.get("where")
if tmp_args.get(key):
return tmp_args.get(key)
if ripper.args.get(key):
return ripper.args.get(key)
elif CONFIG.get(key):
return CONFIG.get(key)
elif os.environ.get(key) and environment == True: