diff --git a/docs/templating.md b/docs/templating.md index 646e344..6dcabac 100644 --- a/docs/templating.md +++ b/docs/templating.md @@ -51,15 +51,16 @@ Each object type exposes fields you can use inside templates. ### `album` -| Field | Description | Example | Type | -| -------------------- | ----------------------------------- | ------------ | -------- | -| `album.id` | Album ID | `98765` | int | -| `album.title` | Album title | `Discovery` | str | -| `album.artist` | Primary artist | `Daft Punk` | str | -| `album.artists` | All main artists | `Daft Punk` | str | -| `album.date` | Release date | `2001-03-13` | datetime | -| `album.explicit` | Explicit content | `clean` | str | -| `album.master:[MAX]` | Is album max quality (`UserFormat`) | `[MAX]` | str | +| Field | Description | Example | Type | +| -------------------- | ----------------------------------- | ----------------- | -------- | +| `album.id` | Album ID | `98765` | int | +| `album.title` | Album title | `Discovery` | str | +| `album.artist` | Primary artist | `Daft Punk` | str | +| `album.artists` | All main artists | `Daft Punk` | str | +| `album.date` | Release date | `2001-03-13` | datetime | +| `album.explicit` | Explicit content | `clean` | str | +| `album.master:[MAX]` | Is album max quality (`UserFormat`) | `[MAX]` | str | +| `album.release` | Release type | `ALBUM/EP/SINGLE` | str | --- diff --git a/tiddl/core/utils/format.py b/tiddl/core/utils/format.py index f23bb18..132ed5b 100644 --- a/tiddl/core/utils/format.py +++ b/tiddl/core/utils/format.py @@ -52,6 +52,7 @@ class AlbumTemplate: date: datetime explicit: Explicit master: UserFormat + release: str @dataclass(slots=True) @@ -147,6 +148,7 @@ def generate_template_data( master=UserFormat( "HIRES_LOSSLESS" in album.mediaMetadata.tags and quality == "MAX" ), + release=album.type, ) playlist_template = None