summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Derricutt <mark@talios.com>2025-10-23 20:50:40 +1300
committerMark Derricutt <mark@talios.com>2025-11-05 09:21:00 +1300
commit5d573c57c9518c9f45449b37d927ad75d9994fd8 (patch)
treef2084a7f4232763f6cbbc5c8eb92a6101c40aaa5
parent2d60f54b39881012f6ff195fbe7c7009b55f6514 (diff)
downloadtidal-dl-ng-5d573c57c9518c9f45449b37d927ad75d9994fd8.tar.gz
Add format place holder for album_type
This commit exposes the album type as a configuration placeholder. Fixes #595 Change-Id: Ife8832534861fc01da5d68c37be6c7476a6a6964
-rw-r--r--tidal_dl_ng/helper/path.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py
index 9227ee3..6ed8020 100644
--- a/tidal_dl_ng/helper/path.py
+++ b/tidal_dl_ng/helper/path.py
@@ -452,6 +452,11 @@ def _format_metadata(
name == "album_explicit" and isinstance(media, Album)
):
return FORMAT_TEMPLATE_EXPLICIT if media.explicit else ""
+ elif name == "media_type":
+ if isinstance(media, Album):
+ return media.type
+ elif isinstance(media, Track):
+ return media.album.type
return None