Provide date and label as template variables (#187)

master
Anthony Forsberg 2021-12-09 21:23:22 -05:00 committed by GitHub
commit e8721a663e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -92,10 +92,14 @@ class BandcampDownloader:
path = path.replace("%{artist}", track['artist'])
path = path.replace("%{album}", track['album'])
path = path.replace("%{title}", track['title'])
path = path.replace("%{date}", track['date'])
path = path.replace("%{label}", track['label'])
else:
path = path.replace("%{artist}", slugify_preset(track['artist']))
path = path.replace("%{album}", slugify_preset(track['album']))
path = path.replace("%{title}", slugify_preset(track['title']))
path = path.replace("%{date}", slugify_preset(track['date']))
path = path.replace("%{label}", slugify_preset(track['label']))
if track['track'] == "None":
path = path.replace("%{track}", "Single")