the-batfish/spotify-downloader

Program fails to convert songs with symbols in the name

Closed this issue · 4 comments

When the song has "/" in the name (AC/DC for example):

  • Couldnt convert song [Errno 2] No such file or directory : file path.mp3

When the song has "?" in the name:

  • Couldnt convert song [Errno 22] Invalid argument: file path.mp3

When it has ":" in the name, a file without extension is left in the download directory. No error message shown

Windows doesn't allow the following characters in filenames:
/ \ ? % * : | < and > Wikipedia

Easiest fix is just to remove them in the code.

Removing the characters might not work in all cases if the song name is only symbols.
No clue what to do then, song name would still show in file metadata.

i did encounter the same problem and fixed it only for one character, ill do for the others too