summaryrefslogtreecommitdiff
path: root/tidal_dl_ng/helper/path.py
diff options
context:
space:
mode:
authorRobert Honz <exislow+github@gmail.com>2024-04-20 11:38:21 +0200
committerRobert Honz <exislow+github@gmail.com>2024-04-20 11:38:21 +0200
commita3ef1b8cbab3c07e62ec021c8de677be50cf3713 (patch)
tree098d050fd8fdaa9d26617e032b33e1d406290200 /tidal_dl_ng/helper/path.py
parentc09781cd8b392e5b51a2b7403b95aa2d136592a0 (diff)
downloadtidal-dl-ng-a3ef1b8cbab3c07e62ec021c8de677be50cf3713.tar.gz
✨ Explicit versions can be tagged with filename placeholder `track_explicit` and `album_explicit`. Fixes #82
Diffstat (limited to 'tidal_dl_ng/helper/path.py')
-rw-r--r--tidal_dl_ng/helper/path.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py
index 1900441..f24bdaf 100644
--- a/tidal_dl_ng/helper/path.py
+++ b/tidal_dl_ng/helper/path.py
@@ -131,6 +131,12 @@ def format_str_media(name: str, media: Track | Album | Playlist | UserPlaylist |
case "track_quality":
if isinstance(media, Track):
result = ", ".join(tag for tag in media.media_metadata_tags)
+ case "track_explicit":
+ if isinstance(media, Track | Video):
+ result = " (Explicit)" if media.explicit else ""
+ case "album_explicit":
+ if isinstance(media, Album):
+ result = " (Explicit)" if media.explicit else ""
except Exception as e:
# TODO: Implement better exception logging.
print(e)