spotDL/spotify-downloader

--restrict=strict not sanitizing directories

Open

#2,371 opened on May 8, 2025

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Python (14,703 stars) (1,418 forks)batch import
BugGood First Issue

Description

System OS

Linux

Python Version

3.8 (CPython)

Install Source

pip / PyPi

Install version / commit hash

v4.2.11

Expected Behavior vs Actual Behavior

Actual Behavior: I am trying to use the --restrict=strict function, it sanitize the song name. But if I do something like "spotdl download mylink --restrict=strict --output "{artist}/{album}/{track} - {artist} - {album}.m4a" it sanitize just the m4a file name but not the folder names... How to do that?

Expected: Using --restrict whole directory names and file names should be sanitized.

Steps to reproduce - Ensure to include actual links!

Execute spotdl download mylink --restrict=strict --output "{artist}/{album}/{track} - {artist} - {album}.m4a

Just the file name gets sanitized (with spaces and special chars removed)

Traceback

I have no traceback, spotdl is logging nothing...

Just "Downloaded inputsong name"

Other details

No response

Contributor guide