From d8f0172e958140582d1f94871be26d0f11a845da Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Fri, 24 May 2024 21:28:32 +0400 Subject: [PATCH] Sanitize filenames --- backend/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/config.py b/backend/config.py index 964f0b9..a872bc3 100644 --- a/backend/config.py +++ b/backend/config.py @@ -14,9 +14,10 @@ class Config: self.cookies_dir = Path(os.getenv('COOKIES_DIR') or 'cookies') self.tmpl = os.path.join( - # `artists.0` instead of `artist`, because the latter can contain "feat. ..." - os.getenv('ALBUM_PATH_TMPL') or 'music/%(artists.0)s/%(album)s', - os.getenv('TRACK_FILE_TMPL') or '%(track)s.%(ext)s', + # 1. `artists.0` instead of `artist`, because the latter can contain "feat. ..." + # 2. as for %(field)S, see https://git.dc09.ru/DarkCat09/musicdlp/issues/3#issuecomment-210 + os.getenv('ALBUM_PATH_TMPL') or 'music/%(artists.0)S/%(album)S', + os.getenv('TRACK_FILE_TMPL') or '%(track)S.%(ext)s', ) # Proxy URL for yt_proxied downloader (can be used for geo-restricted content)