Sanitize filenames

This commit is contained in:
DarkCat09 2024-05-24 21:28:32 +04:00
parent c8e2f1fa1c
commit d8f0172e95
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3

View file

@ -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)