From 4a940ab09f5ef2a1c9dd19f7685d5fba6f09f384 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Wed, 24 Jan 2018 17:10:14 +0100 Subject: [PATCH] Fix spaces not being replaced by dashes when no metadata is found (#220) --- core/internals.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/internals.py b/core/internals.py index 231ef15..3ae0f51 100755 --- a/core/internals.py +++ b/core/internals.py @@ -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))