mirror of
https://github.com/cooperhammond/irs.git
synced 2025-01-02 19:15:26 +00:00
Fixed issue #11
This commit is contained in:
parent
df86541d62
commit
42b5818d1b
|
@ -288,6 +288,7 @@ class Ripper:
|
|||
|
||||
if data == {}:
|
||||
data = self.parse_song_data(song, artist)
|
||||
if data != {}:
|
||||
song = data["name"]
|
||||
artist = data["artist"]
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue