Fix spaces not being replaced by dashes when no metadata is found (#220)

This commit is contained in:
Linus Groh
2018-01-24 17:10:14 +01:00
parent caba5a1c3b
commit 4a940ab09f

View File

@@ -93,6 +93,10 @@ def generate_songname(file_format, tags):
def sanitize_title(title):
""" Generate filename of the song to be downloaded. """
if const.args.no_spaces:
title = title.replace(' ', '_')
# slugify removes any special characters
title = slugify(title, ok='-_()[]{}\/', lower=False,
spaces=(not const.args.no_spaces))